在PHP和Eclipse设置路径映射 [英] Setting up path mapping in PHP and Eclipse
问题描述
我刚刚建立自己的网站在本地,所以我可以更容易地测试我的网页。
I have just setup my website locally so I can test my pages more easily.
Eclipse已经被配置为在本地使用XAMPP服务器。
Eclipse has been configured to use an XAMPP server locally.
问题是,我想我的项目映射到某一个地方在我的网站。
The problem is that I want to map my project to a certain place in my website.
IE浏览器。在我的Eclipse PHP项目我有一个文件夹,名为
ie. In my Eclipse PHP project I have a folder called
com
我想这映射到
/com
在webstie。
我试图做到这一点在Eclipse服务器设置的映射部分,但没有奏效。当我键入
I tried to do this in the mapping section of the Eclipse server setup but it didn't work. When I type
就应该到我的项目文件夹,但是,当我输入其他文件夹,它应该使用正常浏览网页的文件夹。
It should go to my project folder, however, when I type other folder it should use the normal website folders.
我怎么能这样做呢?
推荐答案
好吧,我编辑过这样的Apache httpd.conf文件和它的作品。
Well I edited the apache httpd.conf file like this and it works.
#Alias for com folder
Alias /com C:\PHP\workspace-php\php_project\com
<Directory "C:\PHP\workspace-php\php_project\com">
Options Indexes FollowSymLinks MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
这篇关于在PHP和Eclipse设置路径映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!