<?php
// FILE: protect_predictable_php_ini_should_be_set.php
// certain php.ini parameters *should* be set!!!

ini_set('display_errors', 1);

// uncomment the lines below and refresh the page:

ini_set('date.timezone', 'Europe/London');
ini_set('default_charset', 'UTF-8');

$date = date('Y-m-d H:i:s');
$word = 'คุณพูดภาษาอังกฤษได้ไหม';

?>
<!DOCTYPE html>
<html>
<head>
<title>Avoid Predictable Resource</title>
</head>
<body>
<h1>protect_predictable_php_ini_should_be_set.php</h1>

<p>
To Do:
<ul>
<li>Refresh the page and notice the errors</li>
<li>Uncomment the lines indicated above</li>
<li>Refresh the page and note the errors are gone</li>
</ul>
</p>

<p>
<ul>
<li>Date/Time Error: <?php echo $date; ?></li>
<li>Character Set Error: <?php echo $word; ?></li>
</ul>
</p>

</body>
</html>
