HTML and CSS Reference
In-Depth Information
Workshop
The following workshop includes questions you might ask about server-side develop-
ment, quizzes to test your knowledge, and three quick exercises.
Q&A
Q At work, all of our applications are written using Active Server Pages. Why
didn't you write about that?
A There are a number of popular platforms for writing web applications. PHP has the
advantage of running on a number of operating systems, including Windows, Mac
OS X, and Linux. Furthermore, support for PHP is offered by many web hosting
providers. Finally, as you'll learn in the next lesson, there are many applications
already written in PHP that you can take advantage of. Knowledge of PHP can be
helpful in working with them.
Q Do I need a special application to edit PHP files?
A Just as with HTML, PHP files are normal text documents. Some text editors have
specialized features that make working with PHP easier, just as there are for
HTML. If you're just starting out, using Notepad or any other regular text editor
will work fine, but you'll probably want to find a more powerful tool for writing
PHP if you find yourself programming in PHP a lot.
Q How do I deploy PHP files to a server?
A There are no special requirements for deploying PHP files. You can just transfer
them to the server as you would regular HTML files. As long as the server is con-
figured to handle PHP, you should be fine. The one thing you do need to be careful
to do is to make sure your directory structure is the same on the server and on your
local computer. If you are using includes and directory paths change, your includes
will break.
Q Are PHP scripts browser dependent in any way?
A All the processing in PHP scripts takes place on the server. They can be used to
produce HTML or JavaScript that won't work with your browser, but there's noth-
ing in PHP that will prevent it from working with a browser.
Quiz
1. What is the difference between double and single quotes in PHP?
2. How do the include_once and require_once functions differ?
3. Which functions can be used to help avoid cross-site scripting attacks?
4. How do you declare an associative array in PHP?
 
 
Search WWH ::




Custom Search