1.5 Testing and Executing PHP Scripts from Web Browser

To test or execute PHP scripts from Web browser:

  1. To execute a script from the browser the script or the subdirectory containing the script should be in the sys:\apache\htdocs directory.

    Some PHP sample scripts are available at sys:\php\webdemo folder. To execute these samples, copy them to sys:\apache\htdocs directory or a subdirectory under htdocs directory.

  2. Enter the URL, of the form http://Server_name:port_number/Destinationfolder/scriptname

    For example, the URL for executing the script phpinfo.php located under sys:/apache/htpdocs/phpscripts will be

    http://server_name:port_number/phpscripts/phpinfo.php.

If the setup is correct, information about the PHP setup is displayed. Various configuration parameters which can be modified in php.ini are also displayed.