查看: 961|回复: 3
|
need help in php code which i juz got from the server
[复制链接]
|
|
i m facing this problem someone pls help me:
i got a code from the server n suppose to modify it in my localhost
but for example:
in a.php
theres
<?php
include_once($_SERVER["DOCUMENT_ROOT"] ."/webinfo/b.class.php");
include_once(Envi::p_security);
?>
and in b.class.php theres
class Envi
{const p_security = "/opt/webinfo/apache2/htdocs/webinfo/class/security/security.class.php";
}
but bcoz i installed xampp and working in localhost
http:\\localhost is
C:\xampp\htdocs
and not
"/opt/webinfo/apache2/htdocs/webinfo
as in b.php
so the error it prompt me is:
Warning: include_once(/opt/webinfo/apache2/htdocs/webinfo/class/security/security.class.php) [function.include-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\webinfo\index.php on line 4
what should i do
can anyone help me? |
|
|
|
|
|
|
|
发表于 13-6-2007 01:39 PM
|
显示全部楼层
首先--->用中文吧。
$_SERVER["DOCUMENT_ROOT"] 是你的HTDOCS folder
include_once($_SERVER["DOCUMENT_ROOT"] ."/webinfo/b.class.php");
改成
include_once($_SERVER["DOCUMENT_ROOT"] ."/你的FOLDER/b.class.php"); |
|
|
|
|
|
|
|

楼主 |
发表于 13-6-2007 02:03 PM
|
显示全部楼层
webinfo 是我的 folder 了 才会出现这样的 ERROR 的
/opt/webinfo/apache2/htdocs/webinfo/class/security/security.class.php) [function.include-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\webinfo\index.php on line 4
谢谢 |
|
|
|
|
|
|
|
发表于 15-6-2007 12:50 AM
|
显示全部楼层
p_security = "/opt/webinfo/apache2/htdocs/webinfo/class/security/security.class.php";
你确定你的FILE PATH 是对的? |
|
|
|
|
|
|
| |
本周最热论坛帖子
|