Hello World problem for beginner |
[eluser]Rabbi[/eluser]
After this post http://ellislab.com/forums/viewthread/81081/ I made a file named "blog.php" in application\controllers\blog.php. Here is my code, which i have written in the file blog.php Code: <?php
[eluser]Rabbi[/eluser]
No. But why should i configure database here? I am not using database.
[eluser]RaiNnTeaRs[/eluser]
ow i c ^^. Maybe you can try adding this lines in your class constructor parent::Controller(); Hopes that works
[eluser]xwero[/eluser]
No you don't need to configure a database by default. Try putting the hello world into a view instead of outputting it and call the view file. That is the way the hello world should function if you want to follow the MVC pattern. There should be no problem with the controller as it is. I don't see how you get the error message you see on your screen. Are you including an external file somewhere or autoloading a custom library, helper, model or plugin?
[eluser]stuffradio[/eluser]
A possible problems is you didn't configure the default controller a RaiNnTeaRs I was going to agree with you... but he didn't add a constructor so that's not an issue.
[eluser]xwero[/eluser]
The default controllers can't be the issue as he is directing to a specific controller.
[eluser]Rabbi[/eluser]
OK thnx. Sorry for disturbing you guys. Nothing is working. Btw, i am now debugging the main "index.php". Code: if (strpos($system_folder, '/') === FALSE) It is showing this: "C:\Inetpub\wwwroot\ci/system" Is it correct actually? In Internet Explorer, this link: http://localhost/ci/index.php/blog/index is telling that "The page cannot be found".
[eluser]stuffradio[/eluser]
You shouldn't need to touch the main index file. Did you correctly set the base_url? It should be 127.0.0.1 or localhost. |
Welcome Guest, Not a member yet? Register Sign In |