我在windows 上写好的php项目,运行什么的都没有问题。
ubuntu上的php环境也是配好的,用的nginx。配好后运行phpinfo.php 是没问题的。问题:
我今天把刚写的php项目放在ubuntu server 的www目录下,执行命令:http:// ip /practice/admin.php?controller=admin&method=login 之后也没报错 ,就是个空白页面,什么内容也没有?这是什么情况?这个项目用的smarty模板写的。
ubuntu上的php环境也是配好的,用的nginx。配好后运行phpinfo.php 是没问题的。问题:
我今天把刚写的php项目放在ubuntu server 的www目录下,执行命令:http:// ip /practice/admin.php?controller=admin&method=login 之后也没报错 ,就是个空白页面,什么内容也没有?这是什么情况?这个项目用的smarty模板写的。
最好打开 php 的错误显示功能,或将错误定向的文件
你只显示空白页(实际是 500 错),是因为错误信息无处去,把服务器堵死了smarty 需要写文件,请确认相关目录有写权限
使用 smarty 的项目,不要上传 template_c 目录(注意你可能改了名)中的内容,如果启用了缓存,也不要上传缓存目录中的内容
在页面顶加上<?php
ini_set('display_errors','on');
error_reporting(E_ALL);
?>
错误提示:Warning: require_once(/libs/controller/adminController.class.php): failed to open stream: No such file or directory in /usr/share/nginx/www/practice1/framework/function/function.php on line 3 Fatal error: require_once(): Failed opening required '/libs/controller/adminController.class.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/nginx/www/practice1/framework/function/function.php on line 3 是路径问题,这个linux下路径下应该怎么改
已经打开了,谢谢你,报错是路径问题Warning: require_once(/libs/controller/adminController.class.php): failed to open stream: No such file or directory in /usr/share/nginx/www/practice1/framework/function/function.php on line 3 Fatal error: require_once(): Failed opening required '/libs/controller/adminController.class.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/nginx/www/practice1/framework/function/function.php on line 3