PHP Log Class
ob_start();
echo "<pre>";
print_r($content);
echo "</pre>";
$a=ob_get_contents();
$filename = $_SERVER['DOCUMENT_ROOT']."/log-".date("Y-m-d").".txt";
$file = fopen($filename, "a");
$tipmsg = "\r\n******Final File: "
//.end(explode('/',$_SERVER['PHP_SELF']))
.$_SERVER['PHP_SELF']
."\r\n******Code Container: "
.str_replace("\\","/",substr(__FILE__,strlen($_SERVER['DOCUMENT_ROOT'])))
."\r\n******Time: "
.date("Y-m-d H:i:s")."\r\n\r\n";
fwrite($file, $a.$tipmsg);
fclose($file);
ob_end_clean();
相关文档:
受影响系统:
PHP PHP 5.2.x
不受影响系统:
PHP PHP 5.2.11
描述:
BUGTRAQ ID: 36449
CVE ID: CVE-2009-3291,CVE-2009-3292,CVE-2009-3293,CVE-2009-3294
PHP是广泛使用的通用目的脚本语言,特别适合于Web开发,可嵌入到HTML中。
PHP的5.2.11之前版本的多个函数中存在安全漏洞,可能允许远程攻击者导 ......
PHP条件语句的介绍与应用
1、if 条件语句
if(expr)
echo TRUE
else
echo FALSE
if(expr) {
echo TRUE
}else{
echo FALSE
}
f(expr) {
echo&n ......
<?php
$fileName="function.js";
$file=fopen($fileName,"r");
$writeStr="";
$flag=false;//判断是否有/***/标准
while($strLine=fgets($file))
{
if(stripos($strLine,"/*")===false || stripos($strLine,"/**")===false)
{
&nbs ......
Perl is a language often associated with text processing and CGI. PHP is
a language often associated with dynamic Web pages. Both are very popular
with Web developers. Often, each of these languages is used at the expense of
the other. Hard-core Perl developers would love to develop everyth ......