好像windows底下有个配置文件就在本地解析的
实在记不起了在哪里了
抱歉~

解决方案 »

  1.   

    win98下是windows系统目录下的hosts.sam改名为hosts然后修改文件中相关内容就可以了
    win2k下是在system32下面的driver目录下面的etc目录里面,有hosts这个文件,修改内容就可以了
      

  2.   

    可我已经配置了:
     hosts:
      127.0.0.1       localhost
    但解析localhost的地址并不是127.0.0.1,是否与杀毒、防火墙软件的配置有关?
      

  3.   

    修改apache的配置文件是httpd.conf,不是hosts.conf,里面要修改的内容也很多,不是单单修改BindAddress和ServerName就可以了的,还需要修改DocumentRoot、<Directory "path">,将其改成你的php文件所在的目录,还要添加调试默认得文件扩展名, DirectoryIndex index.html
         DirectoryIndex index.htm 
         DirectoryIndex index.php 
         DirectoryIndex index.php3 
         DirectoryIndex index.php4 
    还要将下面这段代码放到相应的地方
         ScriptAlias /php4/ "C:/php4/"
         AddType application/x-httpd-php4 .php
    AddType application/x-httpd-php4 .php3
    AddType application/x-httpd-php4 .php4
    Action application/x-httpd-php4 "/php4/php.exe"
    这样你的最基本的apache服务器就可以启动了,如果你还要cgi的话,那得去做相应的配置。