Your first PHP-enabled page
A Note on Text Editors: There are many text editors and Integrated
Development Environments (IDEs) that you can use to create,
edit and manage PHP files. A partial list of these tools is
maintained at PHP Editors List. If you wish to recommend an
editor, please visit the above page and ask the page maintainer
to add the editor to the list. Having an editor with syntax
highlighting can be helpful.
A Note on Word Processors: Word processors such as StarOffice
Writer, Microsoft Word and Abiword are not optimal for editing
PHP files. If you wish to use one for this test script,
you must ensure that you save the file as PLAIN TEXT or
PHP will not be able to read and execute the script.
A Note on Windows Notepad: If you are writing your PHP
scripts using Windows Notepad, you will need to ensure that
your files are saved with the .php extension. (Notepad adds
a .txt extension to files automatically unless you take
one of the following steps to prevent it.) When you save
the file and are prompted to provide a name for the file,
place the filename in quotes (i.e. "hello.php").
Alternatively, you can click on the 'Text Documents' drop-down
menu in the 'Save' dialog box and change the setting to
"All Files". You can then enter your filename
without quotes.
Now that you have successfully created a working PHP script,
it is time to create the most famous PHP script! Make a
call to the phpinfo() function and you will see a lot of
useful information about your system and setup such as available
predefined variables, loaded PHP modules, and configuration
settings. Take some time and review this important information.
|