⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 errors.php

📁 一款基于PHP的网络日记程序。WikyBlog支持:多用户的 BLOG
💻 PHP
字号:
<?php//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////defined('WikyBlog') or die("Not an entry point...");global $rootDir,$page,$errorEmail,$pageOwner,$dbInfo,$dbObject;if( $_SESSION['userlevel'] !== 4){	$page->contentA['Admin Only'] = 'You must be an administrator to access this page.';	return;}$dbObject->links['?'] = 'Admin';$dbObject->links['Error Log'] = '/Admin/'.$pageOwner['username'].'/ErrorLog';$file = $rootDir.'/userfiles/error.log';$page->formAction = $dbObject->links['Error Log'];if( !empty($errorEmail) ){	$t = '';	$t .= 'Error Handling has been configured to send errors to the $errorEmail.<br/>';	$t .= 'Messages will not be logged if errors are emailed successfully.<br/>';	$t .= 'To have errors recorded in error.log, delete the email address assigned to $errorEmail in wiki.php.';	message($t);}switch($page->userCmd){	case 'delete log':	case 'delete':		deleteLog($file);		getLog($file);	break;		default:		checkSize($file);		getLog($file);	break;}function checkSize($file){	global $maxErrorFileSize;	if( !isset($maxErrorFileSize) || empty($maxErrorFileSize) ){		$maxErrorFileSize = 10000;	}		$currSize = fileSize($file);	if( $currSize > $maxErrorFileSize){		message('ERROR_LOG_MAXED',$currSize);	}}function getLog($file){	global $page;	$t =& $page->contentA['Error Log'];	$t = '';	$t .= ' <p style="text-align:right"> <input type="submit" name="cmd" value="Reload" >'; 	$t .= ' <input type="submit" name="cmd" value="Delete Log" >';	$t .= '</p><hr/>';	if( is_file($file) ){		$t .= file_get_contents($file);	}}function deleteLog($file){	if( !is_file($file) ){		return;	}		wbData::loadFileFunctions();	$empty = '';	if( saveFile($file,$empty) ){		message('ERROR_LOG_DELETED');	}else{		message('ERROR_LOG_NOT_DELETED');	}	return;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -