Hello all,
I would like to know in the following case which is a better solution:
In the PHP script, if the fileSize is larger than 100 then I stop the script.
<?php
...
if ($fileSize > 100) // case I
{
$results['msg'] = 'fileSize is too big!';
echo json_encode($results);
exit();
}
?>
<?php
...
if ($fileSize > 100) // case II
{
$results['msg'] = 'fileSize is too big!';
exit( json_encode($results) );
}
?>
<?php
...
if ($fileSize > 100) // case III
{
$results['msg'] = 'fileSize is too big!';
return( json_encode($results) );
}
?>
which is a best solution?
Thank you