Compiling PHP with netbeans

Source: Internet
Author: User
Tags netbeans

Compiling PHP with netbeans


After lamp is set up, the PHP code will be written below. I chose netbeans.



1.

Download the corresponding netbeansrepository at http://netbeans.org/downloads/index.html, and select the full version. Javaee may be used in the future, so it is easy to install it again. In addition,Install JDK 6 before installing netbeans



2.

After the download is complete, install it directly.


3.

Open netbeans: files --> new project --> PHP ....... and click it on your own.

Note that:

Netbeans supports running PHP applications on local servers (usually Apache HTTP Server), remote servers (over FTP), or PHP scripts (using PHP interpreters, here, I choose to run the web application under Apache HTTP Server. Therefore
Select "Local Web site" in "Run as" of configuration, and enter the application URL in the project URL field area. The URL is usually similar to http: // localhost /... because you plan to run the project on the local server, you need to provide a runtime location so that netbeans can copy the application code there, so:In the run
Select "Copy files from Sources folder to another location" in configuration, and specify the target location in "Copy to folder" (that is, Apache saves the HTML path, my options are/usr/local/apache2/htdocs /).



4.

Test code, add:

<? PHP

Phpinfo ();

?>



5.

Start Apache

Sudo apachectl start(If not, create a link)


6.

Right-click the project you just created and select run to see the effect. Alternatively, you can directly enter http: // localhost/XXX in your browser ~~



7.

In ubuntu, how does one solve the Chinese garbled characters in netbeans?

Create a directory named fallback under the $ java_home/JRE/lib/fonts directory (you can use echo
$ Java_home display)

Place a Chinese font in the fallback directory, start netbeans, right-click the project, choose Properties> source> code, select gb2312 or GBK, and then restart netbeans.



I have uploaded the Chinese 文 Chinese font found online, you can download the http://download.csdn.net/detail/htttw/3644798 here

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.