0
FB/FB-include.php
的index.php
我要访问我的FB-include.php在我index.php,我在我的索引页面有这条线。
require_once('/fb/fb-include.php');
它工作在我的本地主机上,但是当我更新到服务器时,它不再工作。
我也试试这个
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require_once('$root/fb/fb-include.php');
我做错了什么?有什么办法,我进入该文件夹仍然使用require_once或应该使用include?
可能的复制[有什么不同在单引号和双引号字符串之间的PHP?](http://stackoverflow.com/questions/3446216/what-is-the-difference-between-single-quoted-and-double-quoted-strings-in -php) –
'require_once('fb/fb-include.php');'试试这个 –
试试require_once($ root。'/ fb/fb-include.php'); –