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服务器上可以正常访问。
本人新手,请问大家是什么原因。
谢谢。
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服务器上可以正常访问。
本人新手,请问大家是什么原因。
谢谢。
你要包含securimage.php,绝对路径为C:\Inetpub\wwwroot/securimage/securimage.php结果在这个路径下没有找到文件.
C:\Inetpub\wwwroot/securimage/securimage.php
C:\Inetpub\wwwroot/securimage/securimage.php
估計也沒有這樣的路徑吧,\和/要分清楚
include_once里的路径是不是以"/"开头的?如果是的话,还是根据本文件相对路径找吧。
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行的代码
错误中所描述的
C:\Inetpub\wwwroot/securimage/securimage.php
应该是
D:\chineseloving\securimage\securimage.php在PHP里面怎么写觉得路径和相对路径阿?
多谢
=>
include_once '/securimage/securimage.php';试试
我想你如果能确定那文件是存在的话,你有访问权限吗?
多谢,各位,结贴