在PHP和Eclipse中设置路径映射 [英] Setting up path mapping in PHP and Eclipse

查看:181
本文介绍了在PHP和Eclipse中设置路径映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



Eclipse已经配置为在本地使用XAMPP服务器。



问题是我想将我的项目映射到我的网站上的某个地方。



ie。在我的Eclipse PHP项目中,我有一个名为

  com 

我想要映射到

  / com 

在webstie。



我试图这样做Eclipse服务器设置的映射部分,但它没有工作。当我输入



http:// localhost / com /



它应该去我的项目文件夹,但是,当我键入其他文件夹,它应该使用正常的网站文件夹。



我该怎么做?

解决方案

我编辑了这样的apache httpd.conf文件,它的工作原理。

  #Alias for com folder 
别名/ com C:\PHP\workspace-php\php_project\\ \\com
< DirectoryC:\PHP\workspace-php\php_project\com>
选项索引FollowSymLinks MultiViews ExecCGI
AllowOverride全部
订单允许,拒绝
允许从所有
< / Directory>


I have just setup my website locally so I can test my pages more easily.

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. In my Eclipse PHP project I have a folder called

com

I want this to map to

/com

in the webstie.

I tried to do this in the mapping section of the Eclipse server setup but it didn't work. When I type

http://localhost/com/

It should go to my project folder, however, when I type other folder it should use the normal website folders.

how can I do this?

解决方案

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆