php 程序出现如下错误
Warning: include_once(C:\Inetpub\wwwroot/securimage/securimage.php) [function.include-once]: failed to open stream: No such file or directory in D:\chineseloving\regcheck.php on line 43Warning: include_once() [function.include]: Failed opening 'C:\Inetpub\wwwroot/securimage/securimage.php' for inclusion (include_path='.;C:\php5\pear') in D:\chineseloving\regcheck.php on line 43Fatal error: Class 'Securimage' not found in D:\chineseloving\regcheck.php on line 45我装的是IIS+PHP,虚拟目录指向D:\chineseloving,其他页面可以正常访问。
搞不懂为什么会C:\Inetpub\wwwroot/securimage/securimage.php这样的错。该程序在bluehost 的linux服务器上可以正常访问。
本人新手,请问大家是什么原因。
谢谢。

解决方案 »

  1.   

    从错误信息来看,include_path为c:\php5\pear
    你要包含securimage.php,绝对路径为C:\Inetpub\wwwroot/securimage/securimage.php结果在这个路径下没有找到文件.
      

  2.   

    肯定是路徑問題
    C:\Inetpub\wwwroot/securimage/securimage.php
    C:\Inetpub\wwwroot/securimage/securimage.php
    估計也沒有這樣的路徑吧,\和/要分清楚
      

  3.   

    分析你的错误,及linux下可以正常访问,得出一点可能的结论:
    include_once里的路径是不是以"/"开头的?如果是的话,还是根据本文件相对路径找吧。
      

  4.   


    if(!empty($_POST['reg_submit1'])){ include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php'; $securimage = new Securimage(); if ($securimage->check($_POST['captcha_code']) == false) { // the code was incorrect // handle the error accordingly with your other error checking  // or you can do something really basic like this show_error("您输入的编码不正确。"); }这是regcheck.php文件中39-59行的代码
      

  5.   

    我觉得也是路径的问题
    错误中所描述的
    C:\Inetpub\wwwroot/securimage/securimage.php
    应该是
    D:\chineseloving\securimage\securimage.php在PHP里面怎么写觉得路径和相对路径阿?
    多谢
      

  6.   

    如果使用的站点是默认站点,$_SERVER['DOCUMENT_ROOT'则获取的根目录是: c:\inetpub\wwwroot 
      

  7.   

    include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';
    =>
    include_once '/securimage/securimage.php';试试
      

  8.   

    $_SERVER['DOCUMENT_ROOT'] 就是脚本所在的文档根目录去看下web服务器的配置,DocumentRoot 这项to 7楼,绝对路径就是以c:/这样盘符开头的路径(linux是/);相对路径 比如 ./s.php或s.php表示当前目录的s.php文件to 8楼,不能改,给了就不能兼容linux了
      

  9.   

    在php里路径\和/是通用的,应该不存在问题。
    我想你如果能确定那文件是存在的话,你有访问权限吗?
      

  10.   

        include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';难道是权限问题?
      

  11.   

    最后用了个笨方法拷贝'/securimage/securimage.php' 到wwwroot下面。
    多谢,各位,结贴