Web Design

(Nancy Kaufman) #1

282


Save and Test a PHP Page ......................................


The Save As dialog box
appears.


4 Navigate to your Web server’s
root directory.


On Windows, navigate to
c:/wamp/wwwroot.


On a Mac, navigate to
Applications/MAMP/
htdocs.


Save the Page


1 In your editor, open a
document that contains
PHP code.


2 Click File.


3 Click Save As.


Save and Test a PHP Page


I


n order to run your PHP page, you must request it via your Web server and have it processed
by the PHP engine. You cannot simply open the file directly in your browser as you can HTML

documents. In order for your Web server to access the file, it must be saved in the Web server’s root


folder. In a Windows installation of WAMP, the root folder is at c:/wamp/wwwroot. In a Mac


installation of MAMP, it is at /Applications/MAMP/htdocs. Your PHP files need to have a


.php extension.


2


3


4


1

Free download pdf