You are here: User Guide > Tasks > Running Files and Applications > Running PHP Scripts Locally

Running PHP Scripts Locally

This procedure describes how to run a PHP Script from your workspace using Zend Studio's internal debugger.

 

 

Instructions on how to complete a procedure

To locally run a PHP Script:

  1. Click the arrow next to the Run button on the toolbar and select Run Configurations -or- go to Run | Run Configurations.
    A Run dialog will open.

  2. Double-click the PHP Script option to create a new run configuration.

 

  1. Enter a name for the new configuration.

  1. Select from the following options:

  • Workspace default PHP - Select  to use the default PHP and execution environment defined in the Execution Environments Preferences page.

  • Execution environment - Select the execution environment you would like to use for your debug configuration from the dropdown list.
    Click Environments to change the settings in the Execution Environments Preferences page.

  • Alternate PHP - Select to use another PHP which can be selected from the Installed PHP's list.  

  1. Enter your PHP file in the "PHP File" text field, or click Browse and select your file.

  2. Marking the 'Display debug information when running' checkbox will cause debug views to be displayed.

  3. If necessary, you can add arguments in the PHP Script Arguments tab to simulate command line inputs.

  4. Click Apply and then Run.

Your script will be run and displayed in a browser.

Note:

If the file contains 'include' or 'require' calls to files which are not contained within the project, you must add them to the project's Include Path in order to simulate your production environment.

 

 

Related Links:

Running

Running Files and Applications

Running PHP Scripts Remotely

Running PHP Web Pages

Using the Debugger

 

 

©1999-2012 Zend Technologies LTD. All rights reserved.