trycatch
Anonymous
php
10/14/2021 7:08 AM
304 B
13
Indexable
<?php
try {
echo 'toto'."\n";
// ici tu testes ta date
throw new \Exception('Message erreur');
echo 'titi'."\n";
} catch(\Exception $e) {
echo $e->getMessage()."\n";
// ici tu rediriges
}
echo 'tata'."\n";Editor is loading...