First, install PHPEclipse plug-in
PHPEclipse Download: http://download.csdn.net/detail/yuxiangaaaaa/9750968
After downloading the compressed package, unpack, copy the contents of the features and plugins folders into the corresponding folders under the Eclipse installation directory dorpins.
Site.xml copied to the Exlipse.exe sibling directory. Restart MyEclipse
1, PHP writing automatic prompts
(1) Open the Eclipse Window-> Preferences-> phpeclipse-> PHP-> Code Assist to open the Enable Auto activation option in the following AU To activation triggers for PHP, the default value is "$>", change it, such as AAAA, then Apply, OK.
(2) Export the current preference profile: Open Eclipse's File-> export, expand General-> Perferences-->export in the window, and then click NEXT. Then click Browse to select any path, save the configuration file, and click Finish.
(3) Use Notepad to open just saved that profile (extended file name: *.EPF), press "CTRL + F", enter the "AAAA" just entered, preceded by the string "contentassistautoactivationtriggersphp" (or May Yes: content_assist_autoactivation_triggers_php. Modify the "AAAA" (this is the value just entered, that is, the value after the = number) to "$:>.abcdefghijklmnopqrstuvwxyz" (that is, the code prompts automatically after all of the above symbols are entered in the code, because eclipse allows only 4 custom characters to be entered by default , so doing so can bypass this limitation), and then save and exit Notepad.
(4) Re-import the Modified Preferences profile: Open Eclipse's File-> import and then expand General-> perferences in the Open window, click Next, and select the profile that you just modified, Finish.
Reboot MyEclipse after completion.
2. Create Phpproject
Menu->new->project->php->php Project, specify a name, and then you can use it.
With project selected, mail New-> Other-> PHP File, enter a name to complete. PHP creation.
Second, install Wampserver
Wampserver Download: http://download.csdn.net/detail/yuxiangaaaaa/9750973
Download, install the. exe directly, or you can download one on the internet, a lot of resources.
After installation start Wampserver, when the icon is green is started, click left button, you can see the corresponding stop, start, restart
1, modify the port: Wampserver default port is 80, preferably converted to other ports
Click Wampserver, select Httpd.conf under Apache, find: Listen, you will see
#Listen 12.34.56.78:80
Listen 80
Change the 80 to 8088 and save it.
After the modification: Listen 8088 (if there are Listen 0.0.0.0:80, etc. can be used to comment out the #)
2, MyEclipse Configuration
Windows-> Preferences->phpeclipse
F:\wamp folder for installation directory
After the configuration is complete, you can write the PHP program
Iii. Writing and running PHP
Create Phpproject-> test.php as follows:
<?php
$name = "Xiaoyu";
Print "Hello:\ $name = $name";//double quote parse variable and escape character
print "<br/>"; NewLine
print ' Hello: $name ';//single quotation mark does not parse variable
?>
Copy the. php file to the WWW folder under the Wampserver installation directory
Open Browser: http://localhost:8088/test.php
You can display the results of the operation.
Hello: $name =xiaoyu
Hello: $name
Personal ideas: Copy the phpproject to www, then delete the workspace under Project, and then execute import, import the phpproject under WWW, pay attention not to choose Copy to workspace under,
This makes it easy to compile the current edited. PHP directly, Access: http://localhost:8088/phpProject/test.php
Introduction to PHP Learning
Learning Document Downloads: http://download.csdn.net/detail/yuxiangaaaaa/9750911