gongpex Posted August 8, 2015 Share Posted August 8, 2015 Hello everyone, have simple codeigniter code : function example($id) { if(empty($id)) { redirect(base_url('index.php/example')); } } this code $id is empty it will redirect automatically on page that determined. This work on localhost, but after I uploaded on hosting this code didn't work it will show : Missing argument 1 for Example::example() and Cannot modify header information - headers already sent by (output started at /srv/disk2/602761/www/example.com/system/core/Exceptions.php:189) I had ask to my hosting and they answer to me this probably because they prohibits me to use .htaccess because my hosting is free. Q :Is that true? please answer Thanks Link to comment Share on other sites More sharing options...
Ingolme Posted August 8, 2015 Share Posted August 8, 2015 First, you called a function without passing in the argument. Secondly, you tried to send a header after having printed out content. All headers must be sent before any HTML or any echo statements. .htaccess isn't related to the error messages you are getting. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now