标签:php
1.年月日,时分秒
<?php echo date(DATE_ATOM)."<br/>"; echo DATE_ATOM."<br/>"; ?>
<?php include 'headerx.php'; ?> <?php echo date(DATE_ATOM)."<br/>"; echo DATE_ATOM."<br/>"; ?>
<?php
$f = fopen("/home/tmp/profile.ini", "a+");
echo "error_get_last".print_r(error_get_last());
$str = date(DATE_ATOM)." this is time IP".$_SERVER['REMOTE_ADDR']."\r\n";
fwrite($f, $str, strlen($str));
fclose($f);
$f = fopen("/home/tmp/grep.man", "r");
echo "error_get_last".print_r(error_get_last());
while(!feof($f))
{
<span style="white-space:pre"> </span>echo fgets($f);
}
fclose($f);
?>
可以查看目录权限 ls -l
同时观察当前httpd(apache进程)为何用户在执行: ps -aux | grep httpd
然后改为响应权限即可:chown
4.
setcookie()必须位于<html>之前,默认是30天,单位是秒
标签:php
原文地址:http://blog.csdn.net/hellochenlian/article/details/43851461