Home > Backend Development > PHP Tutorial > PHP基础问题-配置虚拟目录

PHP基础问题-配置虚拟目录

WBOY
Release: 2016-06-20 12:28:56
Original
949 people have browsed it

求助!
我按照韩顺平老师的PHP教程,再加上2.4的更新,写了以下代码


    DirectoryIndex index.html index.htm index.php
    Alias /new "C:/PHP"
    
    #Order allow,deny
    #Allow from all
    #The order command is depreciated so replace with below.
    Require all granted
    



并且把DOCUMENTROOT也comment掉了,可是还是访问不到我的文件,我的文件的地址是
C:\PHP\new.html


回复讨论(解决方案)

http://localhost/new/new.html
访问不到?

你是如何访问的?
访问地址是什么?
用http://localhost/new/new.html访问应该可以的。

访问到了,谢谢各位,原来是我没搞懂,我一直是用http://localhost/PHP/new.html 来访问的,原来alias是把 C:/PHP 改成new,然后通过new路径访问。

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template