1.年月日,时分秒
<?php
echo date(DATE_ATOM)."<br/>";
echo DATE_ATOM."<br/>";
?>2.include可能产生警告但会继续执行,require可能产生致命错误
<?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天,单位是秒
5.
session_start需要在需要使用session的php中都调用
7692

被折叠的 条评论
为什么被折叠?



