Safe Mode warning

edited 十月 2013 in PEAR&PECL
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf8">
<title>無標題文件</title>
</head>

<body>
<?php
require_once 'Date.php';
$mydate = new Date();
$anodate = new Date('2005-09-07');
$result1 = $mydate->after($anodate);
$result2 = $mydate->before($anodate);
$result3 = $mydate->equals($anodate);
echo 'mydate是在anodate之後嗎?:';
var_dump($result1);
echo '<br>mydate是在anodate之前嗎?:';
var_dump($result2);
echo '<br>mydate與anodate是同一個日期物件嗎?:';
var_dump($result3);
?>
</body>
</html>

執行結果出現這個
mydate是在anodate之後嗎?:bool(true)
mydate是在anodate之前嗎?:bool(false)
mydate與anodate是同一個日期物件嗎?:bool(false)

Warning: putenv() [function.putenv]: Safe Mode warning: Cannot set environment variable 'TZ' - it's not in the allowed list in E:\www\index_php_pear\php_pear\PEAR\Date\TimeZone.php on line 308

原始討論: http://twpug.net/x/modules/newbb/viewtopic.php?topic_id=2458

評論

Sign In or Register to comment.