|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2005-04-21 16:52 UTC] MIKEYTF at aol dot com
Description: ------------ Well, I created a function sys_msg($error,$exit). Then it says "Cannot redeclare sys_msg() (previously declared in cfg.inc.php on line 44) on line 44". It does not make sense! Reproduce code: --------------- Well, I don't think I need to show a source code because it is just a function.. but here is the error page: http://subzer0.net/reloaded/ Expected result: ---------------- I expect the index to load and for it to give me an error telling me that some SQL tables are missing. (I haven't completed all the SQL) Actual result: -------------- It gives me the "cannot redeclare" error. (http://subzer0.net/reloaded) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 22 05:00:01 2025 UTC |
<?php function sys_msg($error,$exit) { if($exit==0) { echo ''.$error.''; } elseif($exit==1) { echo ''.$error.''; exit; } elseif(!strlen($exit)) { echo ''.$error.''; } } if(isset($_POST['submit'])) { sys_msg('You clicked the button!','0'); } else { echo ''; } ?> <form action="<?=$_SERVER['PHP_SELF']?>" method="POST"> <input type="submit" name="submit" value="Click Me" /> </form> That's the shortest script I could make..