我设置了环境变量
export SMARTY_DIR='/usr/local/lib/Smarty/'
echo $SMARTY_DIR
/usr/local/lib/Smarty/
为何这个验证无法执行
testInstall();
?>
写成这样就可以
testInstall();
?>
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你是在执行 export 的那个 shell 里运行的 PHP 程序吗?环境变量只对子进程有效的。