我设置了环境变量
export SMARTY_DIR='/usr/local/lib/Smarty/'
echo $SMARTY_DIR
/usr/local/lib/Smarty/
为何这个验证无法执行
<?php
require_once(getenv("SMARTY_DIR").'Smarty.class.php');
$smarty = new Smarty();
$smarty->testInstall();
?>
写成这样就可以
<?php
require_once('/usr/local/lib/Smarty/Smarty.class.php');
$smarty = new Smarty();
$smarty->testInstall();
?>