FeaturesPluginsDocs & SupportCommunityPartners

Setting Up a PHP Project The document applies to NetBeans 6.1 only

Contributed by Barbara Mityashina
April 25, 2008

Before starting a PHP project, you need to install the NetBeans IDE Early Access for PHP and prepare your environment for PHP development.

Creating a PHP project

  1. Start the IDE and switch to the Projects tab.
  2. Choose File > New Project. The Choose Project panel opens. In the Categories list, choose PHP. In the Projects area, choose PHP Application and click Next. The New PHP Project > Name and Location panel opens.

  3. Fill in the fields:
  4. In the Project Name text field, enter the name of the project.
  5. In the Project Location text field, specify folder where you want to create a subfolder for storing the internal files for your project. Use the Browse button if necessary.
    The Project Folder display field shows the automatically generated path to the project folder.
  6. In the Project Sources field, specify the folder on your web server where you want to store your source files: <Document Root>\<New PHP Project>.
    The document root is the folder where the web server looks for files to open in the browser. The document root is specified in the web server configuration file.
    The wizard detects the Apache installation type: as a component or within a package - and provides the path to the default location of the htdocs folder for the current installation type. So if you accepted the default settings during the Apache installation, choose the path from the drop down list.
  7. The Project URL field shows the automatically generated URL of your project: http://localhost:<port>/<new PHP Project>/.
    By default, the port is set to 80. If you web server listens to another port, specify your settings. Make sure that your source folder is specified correctly.
  8. To create an index file, select the Create checkbox and specify the field name in the Index File text field.
  9. From the Default Encoding drop down list, choose the default encoding for your project.
  10. Select the Set as Main Project checkbox if you have more than one PHP project in your projects tree and want the current project to run first.

    New PHP Project Panel with the fields filled in

  11. To complete the project setup, click Finish. To Specify a storage for your source files, click Next. The Source Configuration panel opens. Specify the folder where you want to store your source files and click Finish.

Back to the Learning Trail

Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Open ESB - The Open Enterprise Service Bus Powered by