Ide-eclipse PDT How to set PHP server

Source: Internet
Author: User
Tags php server php cli php website

When you phper to develop PHP website, how do you usually see the effect of a page? Are you building projects directly with Eclipse in Apache's Htdoc directory?
I installed the latest PDT plugin in Eclipse, The Xdebug was installed and the configuration was added to the php.ini, the native Apache was shut down, a new PHP project was created in the custom workspace (not Apache Htdoc), and index.php was added:


  
   

当然我也通过xampp的方式安装了php,apache http服务器,在Eclipse中设定了php executable文件为xampp中的php.exe。
通过右键index.php——>run as——>run configuration——>PHP CLI Application,然后可以成功运行:

我希望在浏览器中打开这个index.php这个文件,于是右击index.php——>run as——>php web application,结果无法打开:

我知道肯定是php server出了问题,但是不知道该怎么配置server。我希望能像java web使用tomcat那种动态部署的感觉:在自己的工作空间写代码,然后点击“运行”按钮后就部署到本地的server上面。不知道使用eclipse的pdt插件能不能这么做。
我的php server是这样设定的:

Reply content:

When you phper to develop a PHP website, how do you usually see the effect of a page? Are you building projects directly with Eclipse in Apache's Htdoc directory?
I have the latest PDT plugin installed in Eclipse, Installed the Xdebug and added the configuration in php.ini, closed the local Apache, built a new PHP project in the custom workspace (not Apache Htdoc), added index.php:

 "!--? phpphpinfo ();   

Of course I also installed the Php,apache HTTP server through XAMPP, and in Eclipse I set the PHP executable file to Php.exe in Xampp. The
Index.php-->run as-->run configuration-->php CLI Application by right-clicking, and then running successfully:

I want to open this index.php file in my browser, and then right-click Index.php-->run as-->php Web application, the result cannot be opened:

I know it's PHP. The server has a problem, but I don't know how to configure the server. I want to be able to feel like a Java Web using Tomcat's dynamic deployment: Write code in your own workspace and then click on the "Run" button to deploy to a local server. I don't know if the PDT plugin that uses eclipse can do this.
My PHP server is set up like this:

If you use XAMPP, the address should be https://localhost not http://localhost

  • 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.