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 your personal Sites folder

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

Before you can use PHP in pages in your Sites folder you need to change the Ownership & Permissions of your Sites folder, as described on the "Enabling PHP on OS X" page.

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 User Site Folder.

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 your Sites folder located inside your Home folder. 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. My Apache Server)

Click the Local Site Folder button and then select your Sites folder in the dialog.

The path selected in the dialog should look something like this:
Macintosh HD:Users:username:Sites:

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.

Enter
http://127.0.0.1/~username/
in the field URL to the Server. Replace username in the line above with the short username you have chosen in the System Preferences Accounts panel.

Click OK.

Select the index.php file from PageSpinner's Windows menu (the file which you should have saved in your Sites 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.