【发布时间】:2013-11-05 18:07:54
【问题描述】:
索引.php
<?php include './include.php'; ?>
<html> Page data
<?php echo $c5t_output; ?>
</html>
include.php
<?php
/**
* GentleSource Comment Script
*
*/
define('C5T_ROOT', '/comment_script_2.1.2/');
include C5T_ROOT . 'comment.php';
?>
当我在页面上加载脚本时出现以下错误 000webhost.com 免费服务器,说 index.php 但它在我的本地 xampp 服务器上完美运行,即使该文件位于正确的位置并具有正确的文件名。
警告:include() [function.include]:无法打开“/comment_script_2.1.2/comment.php”以包含(include_path='.:/usr/lib/php:/usr/local/lib/php' ) 在 /home/a5962782/public_html/include.php 第 9 行
【问题讨论】:
-
一些路径错误,请仔细检查。
-
我想知道你的常数是否应该是相对的?在这种情况下,它应该是
'./comment_script_2.1.2/',即以点为前缀。就目前而言,它希望该文件夹位于文件系统的根目录,您可能在本地计算机上拥有该文件夹 - 如果是这样,它位于错误的位置 - 但在共享托管服务提供商上这是不可能的。
标签: php