Welcome to SpinnerWorld
menu image
menu imageTip of the daymenu image
menu image
menu imageWeb Spinning Resourcesmenu image
menu image
menu imageWeb Spinning Softwaremenu image
menu image
menu imageMailSpinnermenu image
menu image
menu imagemenu imagemenu image
menu image
menu imageSoundSpinnermenu image
menu image
menu imageSpinnerWorld Home Pagemenu image
menu image

Optima System

Creating your first PHP Page in the Apache Web folder

Follow the steps below to create your first PHP page in the Apache Web Server folder with PageSpinner 4.5 and higher on OS X:

Choose OS X Tools from PageSpinner’s Windows menu.

Click the OS X Apache button in the OS X Tools palette and select the menu item Show Server Site.

You may now optionally duplicate the Documents folder to make a copy of the default files that are included with the Apache server in OS X and then move all existing files in the Documents folder to the Trash.

Create a new empty HTML page in PageSpinner.

Paste the following lines with PHP commands inside the BODY section of the page:

<? 
echo "Hello PHP world!<br>";
phpinfo(); 
?>

The statement phpinfo() above is a call to a PHP function which will display a table with information about the PHP environment on the server.

Use PageSpinner's Save command and save the page in: /Library/WebServer/Documents/index.php. Name the page index.php in the Save dialog.

Select Preferences : Web Sites...

Choose an unused site entry in the Web Site list.

Enter a name (ex. Global Apache Server)

Click the Local Site Folder button and select the folder: /Library/WebServer/Documents/ in the dialog.

The path selected in the dialog should look something like this:
Macintosh HD:Library:WebServer:Documents:

Click the Make Active button.

Select View on Server... from the Preview buttons pulldown menu in PageSpinner's toolbar.

Check the box View on Server at the top of the dialog.

Choose http://127.0.0.1/ from the pulldown menu located beside the field URL to the Server:

Click OK.

Select the index.php file from PageSpinner's Windows menu (the file which you should have saved in the
/Library/WebServer/Documents/ folder).

Click the Preview button in the Toolbar.

If everything has turned out successfully, you should now view a page with the text Hello PHP world! followed by a table with information about the PHP settings on your server.

Back

 

 

SpinnerWorld - your Resource Center for information on PageSpinner and related Web spinning software, services, resources, tips and news. Search...

SpinnerWorld & the Optima Spinner Software is copyright © 2008 Optima System. All Rights Reserved.