是不是就只能这样,不能看到别的目录下的PHP文件?

解决方案 »

  1.   

    你没有设置虚拟目录,
    所以你把PHP文档(网页)放在其它目录下是无法打开的
    设置如下:
    找到: Apache-->conf-->httpd.conf在alias虚拟目录设置项下加入你要的目录:例如:    Alias /icons/ "E:/Apache/Apache/icons/" //----这项Apache一般会有的
    //这里加入你的虚拟目录:
        Alias /ggajj.net/ "E:/wwwroot/ggajj/"----------------------------------
    欢迎访问:www.ggajj.net
    mtv.ggajj.net 轻松一刻,
    ---------------------------------
      

  2.   

    我终于搞定了,不过又遇到新问题:
        我只能打开PHP文件,html文件就说文件找不到.在httpd.conf配置文件中我也有增加addtype application/x-httpd-php-source .html这句话啊,为什么还不行?
      

  3.   

    不用增加呀,本来就可以看HTML
    看看文件名的大小写是不是一样!
      

  4.   

    HTML是默认的,不需要增加………………
    PHP、CGI等才是需要增加的。文件名大小写也无所谓。只看你有没有把文件名写对。
      

  5.   

    文件名写对了呀,但还是一样错。显示的页面如下:Not Acceptable
    An appropriate representation of the requested resource /index could not be found on this server. 
    Available variants: index.html.ca , type text/html, language ca 
    index.html.cz , type text/html, language cz 
    index.html.de , type text/html, language de 
    index.html.dk , type text/html, language da 
    index.html.ee , type text/html, language et 
    index.html.el , type text/html, language el 
    index.html.en , type text/html, language en 
    index.html.es , type text/html, language es 
    index.html.fr , type text/html, language fr 
    index.html.he.iso8859-8 , type text/html, language he, charset iso-8859-8 
    index.html.it , type text/html, language it 
    index.html.ja.jis , type text/html, language ja, charset iso-2022-jp 
    index.html.kr.iso-kr , type text/html, language kr, charset iso-2022-kr 
    index.html.lu , type text/html, language ltz 
    index.html.nl , type text/html, language nl 
    index.html.no , type text/html, language no 
    index.html.po.iso-pl , type text/html, language pl, charset iso-8859-2 
    index.html.pt , type text/html, language pt 
    index.html.pt-br , type text/html, language pt-br 
    index.html.ru.cp-1251 , type text/html, language ru, charset windows-1251 
    index.html.ru.cp866 , type text/html, language ru, charset cp866 
    index.html.ru.iso-ru , type text/html, language ru, charset iso-8859-5 
    index.html.ru.koi8-r , type text/html, language ru, charset koi8-r 
    index.html.ru.ucs2 , type text/html, language ru, charset ucs-2 
    index.html.ru.ucs4 , type text/html, language ru, charset ucs-4 
    index.html.ru.utf8 , type text/html, language ru, charset utf-8 
    index.html.se , type text/html, language sv --------------------------------------------------------------------------------Apache/1.3.20 Server at localhost Port 80
      

  6.   

    将index.html.en文件名改为index.html
      

  7.   

    将index.html.en文件名改为index.html
    ???
    我的文件名是index,没有加什么后缀啊
      

  8.   

    将index.html.en文件名改为index.html这是指在apache目录下找到文件http.conf,(位于安装目录的conf下)
    用编辑器打开,然后把index.html.en文件名改为index.html
      

  9.   

    有没有搞错?文件中根本就没有index.html.en嘛
      

  10.   

    你的文件名是index是什么意思??没有扩展名的吗??那就将index改为index.html吧
    另外不用增加addtype application/x-httpd-php-source .html这句话
      

  11.   

    htdoc下的没有默认的index.html他就会将所有的文件列出(如果允许)。
    所以应该是缺少了这个默认首页。
      

  12.   

    phpteam(好无聊):我的文件名是index ,后面没有显示后缀名,但我查看属性是MICROSOFT HTML DOCUMENT 5。0 ,其实不管是什么HTML文件,比如一个名字叫“1”的HTML文件,它也是打不开。即显示我上面贴的那一段。
      

  13.   

    我照作了,看到文件后缀名是htm,我改成了html,有文件可能不可用的提示。其实我改不改都问题照旧,我的默认目录c:\php4\test,比如有两个文件:index.htm和zz.htm,当我在地址栏内输入http://localhost/index.htm或http://localhost/zz.htm,显示"改页找不到".我把两个的后缀名都改成html后,当我在地址栏内输入http://localhost/index.html时,显示我上面贴的那一大段,而输入http://localhost/zz.html时,显示页面找不到.
        我仍在等待,虽然我快没信心了......
      

  14.   

    修改httpd.conf
    DocumentRoot "c:/php4/test"<Directory "c:/php4/test">
        Options Indexes FollowSymLinks
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>