错误:undefined function include()
main.php
<?php
include_once("class/Smarty.class.php"); //包含smarty类文件
$smarty = new Smarty(); //建立smarty实例对象$smarty
$smarty->template_dir ="/.templates/";//设置模板目录
$smarty->compile_dir ="/.templates_c/"; //设置编译目录
$smarty->config_dir = "/.configs/";
$smarty->left_delimiter = "{";
$smarty->right_delimiter = "}";
test.php
<?php
include('main.php');
// $smarty->assign('title', '测试用的网页标题');
// $smarty->assign('content', '测试用的网页容');
// $smarty->display('test.htm');
?>
在上面的两个页面,main.php未抛错,而test.php抛以下错误
Fatal error: Call to undefined function include() in D:\webRoot\testPro2\test.php on line 2
这会是什么原因呢?
?>