28 Mayıs 2012 Pazartesi

Setting up a PHP Project in the NetBeans IDE

1. Start the IDE, switch to the Projects window, and choose File > New Project. The Choose Project panel opens.

2. In the Categories list, choose PHP.

3. In the Projects area, choose PHP Application and click Next. The New PHP Project > Name and Location panel opens.














4. In the Project Name text field, enter NewPHPProject.

5. In the Sources Folder field, browse for your PHP document root and create a subfolder there called NewPHPProject. 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. For example, on Xampp, the document root is XAMPP_HOME/htdocs.

6. Leave all other fields with their default values. Click Next. The Run Configuration window opens.














7. In the Run As drop-down list, select Local Web Site. The project will run on your local Apache server. Your other options are to run the project remotely via FTP and to run it from the command line.


8. Leave the Project URL at default.

9. Click Finish. The IDE creates the project.

10. The NewPHPProject tree appears in the Projects window and the project's index.php file opens in the editor and in the Navigator window.












11. Enter the following code inside the block:

echo "Hello, world! This is my first PHP project!";

12. To run the project, position the cursor on the NewPHPProject node and choose Run from the context menu. The figure below shows what you should see in the browser window:


Hiç yorum yok:

Yorum Gönder