Peculiar problem with session->set_flashdata |
[eluser]foysal[/eluser]
Hi all I am facing a peculiar problem with session->set_flashdata. below is the code of my contoller Code: if ($data_from_database->num_rows() > 0) my view as like below Code: <div class="error1"><?php $this->session->flashdata('message'); ?></div> When I put this controller and view in a folder named CodeIgniter and try to see the output at http://localhost/CodeIgniter/index.php/login/log , it is working fine but if I rename the folder name as CodeIgniter1 or copy whole code in a folder named CodeIgniter1 and try to see the output at http://localhost/CodeIgniter1/index.php/login/log , it is not working. This problem also arises if I change computer. Can any one say where is the problem, what is the solution?? Foysal
[eluser]WanWizard[/eluser]
Controllers go into application/controllers. In your setup, 'CodeIgniter' is a folder in your webservers docroot that contains the entire CI installation. So what have you exactly done? Because that foldername is not relevant to your CI installation. And since you're using index.php in your URL, rewriting shouldn't be an issue here.
[eluser]foysal[/eluser]
Dear WanWizard Your words are not so clear to me. -- Controllers go into application/controllers. yes, I put my codes of controller into application/controllers folder. -- In your setup, ‘CodeIgniter’ is a folder in your webservers docroot that contains the entire CI installation. yes, You understand . -- And since you’re using index.php in your URL, rewriting shouldn’t be an issue here. My problem is the code works well CodeIgniter folder but if I change the folder nama to CodeIgniter1 it does not work, that means flashdata is not showing. Thanks for reply . Foysal
[eluser]osci[/eluser]
In case you have set $config['base_url'] in config.php check if it has correct entry
[eluser]InsiteFX[/eluser]
If you look in the index.php file you will see that you have to set the the system_folder and application folders so that CodeIgniter knows were they are! InsiteFX
[eluser]foysal[/eluser]
My problem is in the below line of view. <div class="error1"><?php $this->session->flashdata('message'); ?></div> If I use folder name CodeIgniter it is working and I get a message. but if I use folder name CodeIgniter1 then it is not working , I can not see any message. Even if I change computer and copy the CodeIgniter folder to another computers' web root (htdocs) then it is not working also. It is absolutely Peculiar problem. Thanks all for reply. Foysal
[eluser]InsiteFX[/eluser]
Show us a directory listing of how you have it setup! InsiteFX
[eluser]Unknown[/eluser]
Hi Foysal I know it has been 2 years since you originally posted this topic, but I have a similar problem and was wondering if you figured out what your problem was. Any advice you can share would be much appreciated! Thanks Bianca
|
Welcome Guest, Not a member yet? Register Sign In |