PHP project configuration
When you add a new PHP: Hypertext Preprocessor (PHP) project to the application, you specify the project name, browse to the working directory, and then specify the source roots and project dependencies. The project dependencies can also be set in the Project Dependencies tab of the project properties after the project has been created.
About this task
The steps in this topic direct you to complete all pages in the New Project Wizard (or New Application Wizard, if you are creating the project in it). However, some of the pages in the wizard are optional (required settings are complete when the Finish button is activated). Settings made in the wizard can be modified after project creation in the Properties view for a selected project. If you complete the New Project Wizard without completing optional pages, you can change the settings from those pages later on in the Properties view.
Procedure
- In the Explorer view, select the application that you want to add the project to (if you have not already added an application, see Configuring applications).
- Complete one of these actions to
open the New Project Wizard:
- Select from the main workbench menu.
- Right-click the selected application and choose from the context menu.
- In the Select Project Type page of the wizard, select PHP as the project type and then click Next to advance to the next wizard page.
- In the Project Sources wizard page:
- PHP Project Configuration: In the PHP Document Root field, enter or browse to a directory that represents the root of your PHP application. This is the file system directory that is mapped to the site's base URL. If a PHP document root is not specified, the source root that was specified in the Project Sources page will be used.
- Optional: Set an Include Path.
Include path directories are used to resolve relative paths to files
used in PHP
include
statements (for example,include
,include_once
,require
,require_once
). - Optional: Set a Class Include Path. Class include path directories are used to find files that contain PHP class definitions.
- Click Finish.
- Optional: Configure unresolved dependencies: In the project properties, go to the Project Dependencies page and follow the steps for Configuring unresolved PHP include expressions and Configuring unresolved PHP class references.