大佬教程收集整理的这篇文章主要介绍了如何在我的本地PHP开发人员设置中设置DOCUMENT_ROOT和站点根目录?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
如何轻松地将document_root的引用设置为应该是什么(在本地,尽管如此,不要真的想弄乱网站文件,因为我需要再次上传它们,不想破坏实况网站!是否有一种间接设置的方式,PHP认为网站的根源是这样的图像的src引用“/ images / …”将正确显示…我的本地PHP开发网址是:http://localhost:8888/_CLIENTS/clientsite/www/ …但是在代码中’/’开头的’/ images / …’引用了http://localhost:8888/?
谢谢.
> localhost – >你的起始页或者什么
> alien.localhost – >客户端站点,无论您想要的路径/文档根目录.
> x.localhost – >另一个网站
在apaches全局配置文件或包含vhost.conf;
NameVirtualHost localhost:80 # the MysqL tool's url <VirtualHost @L_987_8@myadmin.localhost:80> # and absolute path DocumentRoot "/srv/www/@L_987_8@myAdmin/" </VirtualHost> #Same for the Client Site <VirtualHost foo.localhost:80> DocumentRoot "/path/to/desired/webroot/" </VirtualHost>
在apache的全局服务器配置
DocumentRoot "/srv/www/htdocs" # # Configure the DocumentRoot Properties # <Directory "/srv/www/htdocs"> Options All # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All","None",or any combination of the keywords: # Options FileInfo AuthConfig Limit AllowOverride All # Controls who can get stuff from this server. Order allow,deny Allow from all </Directory> # # Configure Sub-Domain Properties. This prevents those nasty 403 errors # # MysqL administration tool <Directory "/srv/www/@L_987_8@myAdmin/"> Options Indexes MultiViews AllowOverride All Order allow,deny Allow from all </Directory> # a client web site built with CakePHP <Directory "/home/eddie/workspace/Digital_Business/app/webroot/"> Options All AllowOverride All Order allow,deny Allow from all </Directory>
以上是大佬教程为你收集整理的如何在我的本地PHP开发人员设置中设置DOCUMENT_ROOT和站点根目录?全部内容,希望文章能够帮你解决如何在我的本地PHP开发人员设置中设置DOCUMENT_ROOT和站点根目录?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。