my code:
<?php
if (isset($_GET['stranka']))
$stranka = $_GET['stranka'];
else
$stranka = 'index';
if (preg_match('/^[a-z0-9]+$/', $stranka))
{
$vlozeno = include('stranky/' . $stranka . '.php');
if (!$vlozeno)
echo('Chyba. Stránka nenalezena.');
}
else
echo('Chyba. Neplatný parametr.');
?>
I have this warnings:
Warning: include(stranky/uzivatel.php): failed to open stream: No such file or directory in C:\xampp\htdocs\test\index.php on line 96
Warning: include(): Failed opening 'stranky/uzivatel.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\test\index.php on line 96
Chyba. Stránka nenalezena.
And i want to ask for how to disable them.
It checks and write Error. Page is not found, but warnings :/
Thanks for help