thinkphp关闭调试模式(APP_DEBUG => false),导致程序出错,开启调试模式,不报错,怎么解决?

查看Logs日志记录:

[ --29T09::+: ] 113.108.11.52 /icloud/index.php?g=user&m=index&a=is_login
INFO: [ app_begin ] --START--
INFO: Run Behavior\ReadHtmlCacheBehavior [ RunTime:.000030s ]
INFO: Run Behavior\CheckLangBehavior [ RunTime:.000083s ]
INFO: Run Common\Behavior\UrldecodeGetBehavior [ RunTime:.000031s ]
INFO: [ app_begin ] --END-- [ RunTime:.000215s ]
NOTIC: [] Undefined index: url application/Common/Controller/AppframeController.class.php 第 行.

报Undefined index,索引错误,但告警级别只是NOTICE,按路径查看源代码,加一个数组声明语句:

$data=array();

=========================

附上一个阿里云搭建tomcat 和 php环境的nginx配置

server {
listen default_server;
listen [::]: default_server ipv6only=on; index index.php index.html index.htm; # Make site accessible from http://localhost/
server_name www.sysucloud.edu.cn localhost sysucloud; location /icloud {
root /var/www/html;
index index.html index.php;
# First attempt to serve request as file, then
# as directory, then fall back to displaying a .
# try_files $uri $uri/ =;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules location ~ \.php$ {
fastcgi_pass 127.0.0.1:;
# fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
fastcgi_index index.php;
} }
# tomcat 代理转发
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host:;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_redirect http://host:8080 http://$host:$server_port; access_log /var/log/nginx/tomcat_access.log;
error_log /var/log/nginx/tomcat_error.log;
} # Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
# location /RequestDenied {
# proxy_pass http://127.0.0.1:8080;
# } error_page /.html; # redirect server error pages to the static page /50x.html
#
error_page /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:
#
location ~ /Uploads/.*\.php$ {
deny all; }
location ~ \.php/ {
if ($request_uri ~ ^(.+\.php)(/.+?)($|\?)) { }
fastcgi_pass 127.0.0.1:;
# fastcgi_pass unix:/var/run/php5-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_NAME $;
fastcgi_param PATH_INFO $;
fastcgi_param SCRIPT_FILENAME $document_root$; } # deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}

thinkphp关闭调试模式(APP_DEBUG => false),导致程序出错的更多相关文章

  1. 解决ThinkPHP关闭调试模式时报错的问题汇总

    解决ThinkPHP关闭调试模式时报错的问题汇总 案例一: 最近用ThinkPHP开发一个项目,本地开发测试完成上传到服务器后,第一次打开正常,再刷新页面时就出现 "页面调试错误,无法找开页 ...

  2. linux下thinkphp取消调试模式后找不到网页解决方案

    1.最大嫌疑是Runtime目录权限不足,导致common~runtime.php文件无法生成, 解决:1.整个Runtime目录删除,让系统重新生成; 2.给Runtime及以下的所有文件足够权限0 ...

  3. // 关闭调试模式  define('APP_DEBUG', false);

    调试模式的优势在于: 开启日志记录,任何错误信息和调试信息都会详细记录,便于调试: 关闭模板缓存,模板修改可以即时生效: 记录SQL日志,方便分析SQL: 关闭字段缓存,数据表字段修改不受缓存影响: ...

  4. Thinkphp开启调试模式

    3.0版本的调试模式开启,必须在项目入口文件中添加常量APP_DEBUG定义,如下: define('APP_DEBUG',True); // 开启调试模式 开启调试模式后,你可能感觉不到什么变化,不 ...

  5. 头疼3-4次的问题,数据从DB导出到EXCEL,再从EXCEL导入到DB,数据格式发生错误 ,导致 程序出错。

    反思: 1 解决 问题的思路 绕远了: 在这个问题出现前,程序是运行正确 的 问题出现前,我误删了DB 的 testcase表的所有 case ,然后 再把邮件 中的excel数据导入到 DB 然后 ...

  6. Visual Studio 调试系列8 查找导致程序崩溃的 DLL(使用模块窗口)

    系列目录     [已更新最新开发文章,点击查看详细] 如果应用程序在调用系统 DLL 或他人的代码时崩溃,则需要找出在崩溃发生时处于活动状态的 DLL. 如果在自己的程序之外的 DLL 中遇到崩溃, ...

  7. tp5--开启与关闭调试模式

    https://www.cnblogs.com/finalanddistance/p/8906000.html TP5 显示错误信息   在TP5中,我们运行的代码有错误无法执行时,只显示页面错误,而 ...

  8. thinkphp 调试模式

    ThinkPHP有专门为开发过程而设置的调试模式,开启调试模式后,会牺牲一定的执行效率,但带来的方便和除错功能非常值得. 直线电机哪家好直线电机生产厂家 我们强烈建议ThinkPHP开发人员在开发阶段 ...

  9. ectouch第九讲 之ectouch 开始调试模式方法

    ectouch 开始调试模式方法 原文: http://my.oschina.net/u/1036767/blog/407067页面报错对于发现编程过程中的问题很重要,所以在开发之前要先搞定它,免得出 ...

随机推荐

  1. 让dedecms autoindex,itemindex 从0到1开始的办法! 多重样式输出(借鉴)

    原网址:http://my.oschina.net/lyx2012/blog/55888 [field:global name=autoindex runphp="yes"]@me ...

  2. js获取url的常用方法

    //设置或获取对象指定的文件名或路径. console.log(window.location.pathname) //设置或获取整个 URL 为字符串. console.log(window.loc ...

  3. MFC下OpenGL入门(可以用)

    MFC下OpenGL入门 源文件 1, 建一工程文件,我这里命名为first,现在first工程里面我们没有添加任何东西,所有的东西都是MFC自动帮我们创建的. 2, 添加链接库.这一步很关键.打开菜 ...

  4. 3.Complementing a Strand of DNA

    Problem In DNA strings, symbols 'A' and 'T' are complements of each other, as are 'C' and 'G'. The r ...

  5. iOS复选框

    这种按钮iOS没有原生效果. 可以靠按钮的不同点击状态来实现这个效果. 代码如下: _workBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [ ...

  6. C#的选择语句练习

    1.请输入一个数x,若x<1,则y=x:若1<=x<10,则y=2x-1:若x>=10,则y=3x-11,要求随意输入一个x值,求出y值. 2.输入问题[你有房子吗?],若回答 ...

  7. 基于注解的SpringMVC简单介绍

    SpringMVC是一个基于DispatcherServlet的MVC框架,每一个请求最先访问的都是DispatcherServlet,DispatcherServlet负责转发每一个Request请 ...

  8. linux vsftp配置

    1.rpm -q ftp 查看是否安装ftp服务器 2.yum install vsftp 安装ftp服务器 3.修改配置文件/etc/vsftpd 下面的 ftpusers和user_list,这两 ...

  9. aop配置

    前置通知 后置通知 环绕通知 异常通知 定义切面 aop-config 切入点 切面 通知 spring jdbc

  10. 博客开篇:随笔《从windows到linux的转变》。

    在QQ群里讨论到了WINDOWS和LINUX.MAC,用手机码了如下回复,索性转过来当做博客的开篇.:) unix 和linux 在外很火的主要原因是开源,国外崇尚自由的精神是从出生就在细胞里的,而w ...