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