NetBeansIDEPHP Quick Start tutorial (network cleaning)

Source: Internet
Author: User
Tags php debugger php development environment php download netbeans
NetBeansIDEPHP Quick Start tutorial (network arrangement) directory components installed in NetBeansIDE for PHP set PHP project run first PHP project in NetBeansIDE for PHP use database server follow-up steps to learn this tutorial, you must have the following software and resources. Software or resource required version NetBeansIDEPH NetBeans ide php Quick Start tutorial (network arrangement)

Directory

  • Component installation
  • Set the PHP project in NetBeans IDE for PHP
  • Run the first PHP project
  • Use the database server in NetBeans IDE for PHP
  • Subsequent steps

To learn this tutorial, you must have the following software and resources.

Software or resources Required version
NetBeans IDE PHP download package
PHP engine Version 5
Web server Apache HTTP Server 2.2 is recommended.
PHP debugger XDebug 2.0 or later

You can install the PHP engine, Web server, and database separately, or use (APache,MYSQL,PHP) package for installation.

Installation and configuration

The following documents describe one or two methods for setting the PHP Web stack on the operating system. These instructions are not authoritative. The Web stack is composed of third-party software, and because your environment may be different, you may want to use another AMP package or other methods to set PHP. You may need to supplement our instructions through your own research.

  • Configure the PHP development environment in Windows
  • Configure the PHP development environment in the Ubuntu Linux release
  • Configure the PHP development environment in Mac OS X
Set the PHP project in NetBeans IDE for PHP

For more information about how to install and start NetBeans IDE, see the installation documentation.

To develop a PHP application in NetBeans IDE for PHP, you must first create a project. This project contains information about the project file location and the running and debugging methods (running configuration) of the application.

  1. Start IDE, switch to the Projects window, and select File> New Project ). The "Choose Project" (select Project) panel is displayed.
  2. In the "Categories" (category) list, select "PHP ".
  3. In the Projects area, select "PHP Application" and click "Next ). The "Name and Location" panel of "New PHP Project" (New PHP Project) opens.
  4. In the Project Name text field, enterNewPHPProject.
  5. In the "Sources Folder" field, browse to the root directory of your PHP document and create a file namedNewPHPProject. The Web server will find the file to be opened in the browser from the root directory folder of the document. The document root directory is specified in the Web server configuration file. For example, for Xampp, the document root directory is XAMPP_HOME/htdocs.
  6. Retain all other fields as their default values. Click "Next ). The "Run Configuration" window opens.
  7. In the "Run As" drop-down list, select "Local Web Site ). This project runs on the local Apache server. Other options are used to remotely run the project through FTP and run in the command line.
  8. Retain "Project URL" as the default value.
  9. Click Finish ). IDE will create this project.
Learn more about setting up a PHP project in NetBeans. Run the first PHP project
  1. Start IDE and select "File"> "Open Project ). The "Open Project" dialog box is displayed.
  2. SelectNewPHPProjectAnd then click Open Project ). The NewPHPProject tree is displayed in the "Projects" window, and the project'sIndex. phpFile.
  3. In Enter the following code in the block:
     echo "Hello, world! This is my first PHP project!";
  4. To Run the project, place the cursor on the "NewPHPProject" node and select "Run" from the context menu ). Displays the content that should be viewed in the browser window:

    Congratulations! Your program can run normally!
You can use a variety of database servers in the NetBeans IDE for PHP, but the most common is the MySQL server. You can download it from here.
Note: The recommended MySQL Server 5.0 version is provided.
For more information, see:
  • Set MySQL database server in Windows
  • Create a sample database using test data
  • MySQL and NetBeans IDE
  • Connect to the MySQL database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.