Apr
14

不影响前台用户体验的前提下开启debug

config.php
<?php
if(!(isset($_SESSION['debug'])&&$_SESSION['debug']==’1′))error_reporting(0);
?>

admin.php
<?php
if(isset($_GET['cp'])&&$_GET['cp']==’open_debug’)$_SESSION['debug']=’1′;
?>
<a href=”?cp=open_debug”>开启debug</a>

Trackback URL

Trackback Note

Add reply