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