如何修改PHP访问文件路径?? 我是PHP初学者,请教高手。我安装了Apache+PHP+MySQL+Serv-U 服务器套件 1.0 ,安装在 F:\Apache+MySQL+PHP文件夹下。默认访问文件路径是: F:\Apache+MySQL+PHP\MyServer\Apache2.2.9\htdocs这样很不方便,我想把文件放在 E:\WebSite\htdocs文件夹下来访问。那么我该如何修改配置文件?先谢啦! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 #1 修改apache配置文件httpd.conf找到;Include "conf/extra/httpd-vhosts.conf"去掉前面的分号;#2 在apache/extra/httpd-vhosts.conf添加虚拟目录; <VirtualHost *:80> DocumentRoot "虚拟目录" ServerName 域名 <Directory "虚拟目录"> Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>#3 在C:/Windows/System32/drivers/etc/hosts把你的域名加进来。 形式:127.0.0.1 你的域名 ①将"Include conf/extra/httpd-vhosts.conf"前面的'#'去掉。②在httpd-vhosts.conf中修改:<VirtualHost *:8080> ServerAdmin [email protected] DocumentRoot "F:/abc" ServerName 127.0.0.1 ErrorLog "logs/dummy-host2.huyinglong.com-error.log" CustomLog "logs/dummy-host2.huyinglong.com-access.log" common</VirtualHost><Directory "F:/abc"> Options Indexes Includes FollowSymLinks AllowOverride None Order deny,allow Allow from all</Directory>③访问http://127.0.0.1:8080 PHP程序如何生成后缀为.PHP的文件?? 用什么方法处理效率较好 如何配置openssl apache+windows 网站乱码问题 为什么print_r或echo总是多输出一个字节0x0a,如何解决? 求助:在框架中提交数据,结果中出现乱码 请问session的默认贮存目录是什么?phpinfo中怎么没发现。 dreamweaver工具打开的代码出现乱码 如何解决? 关与上传的问题 【在线等】请问这个地址怎么实现重写? 想用php做链表,毛病是:结点总是被清空,反来覆去只有一条记录,有什么办法实现吗? 想用PHP建个站,请推荐个域名注册代理商吧
#2 在apache/extra/httpd-vhosts.conf添加虚拟目录;
<VirtualHost *:80>
DocumentRoot "虚拟目录"
ServerName 域名
<Directory "虚拟目录">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#3 在C:/Windows/System32/drivers/etc/hosts把你的域名加进来。
形式:127.0.0.1 你的域名
②在httpd-vhosts.conf中修改:
<VirtualHost *:8080>
ServerAdmin [email protected]
DocumentRoot "F:/abc"
ServerName 127.0.0.1
ErrorLog "logs/dummy-host2.huyinglong.com-error.log"
CustomLog "logs/dummy-host2.huyinglong.com-access.log" common
</VirtualHost>
<Directory "F:/abc">
Options Indexes Includes FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
</Directory>
③访问http://127.0.0.1:8080