surreal5335 Posted January 12, 2010 Share Posted January 12, 2010 I am getting an error stating: Fatal error: Cannot redeclare redirect_to() (previously declared in /home1/royalvil/public_html/post_ads/controller.php:9) in /home1/royalvil/public_html/post_ads/controller.php on line 14 The code is as follows for the function: function redirect_to($address) { header('location:'.WEBSITE.APP_ROOT.$address); exit; } The only other place this function is used in another file is here: redirect_to('posts'); Any ideas as to what this is refering to? Thanks a lot for the help Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted January 12, 2010 Share Posted January 12, 2010 The code is as follows for the function: Yes, but that does not show the relevant code leading up to that point that is causing that function definition to be evaluated more than once. The function definition is either within a loop or is in a file that is being included more than once. Without showing the context where the function definition exists, it is not possible to directly help with the problem. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.