Welcome Guest, Not a member yet? Register   Sign In
Can't load simple blog.php function
#1

[eluser]JohnnyAction[/eluser]
I installed CI for the first time today and the welcome page works great:
[email=http://www.johnnyaction.ca/ci_doctrine_day1/index.php]http://www.johnnyaction.ca/ci_doctrine_day1/index.php[/email]

Then I created a blog.php file and put it in the controllers directory:
Code:
<?php

class Blog extends Controller {
   function index()
   {
      echo "hey!";
   }
}

?>

When I try and view this page:
[email=http://www.johnnyaction.ca/ci_doctrine_day1/index.php/blog/]http://www.johnnyaction.ca/ci_doctrine_day1/index.php/blog/[/email]

I get a HTTP 404 Not Found error.

The interesting part is that if I change the routes.php file to point to 'blog' instead of 'welcome', when I run the index.php, it shows my blog.php. That means my code isn't wrong. Why can't I access it directly?
#2

[eluser]Davide Bellini[/eluser]
I've tried :
http://www.johnnyaction.ca/ci_doctrine_d....php/blog/ and it work ...

Have you solve the problem??
#3

[eluser]JohnnyAction[/eluser]
No, I haven't changed anything. Still doesn't work in IE 7 for me.
What browser are you using?
#4

[eluser]danmontgomery[/eluser]
http://www.johnnyaction.ca/ci_doctrine_d...php?/blog/
#5

[eluser]Davide Bellini[/eluser]
UP
#6

[eluser]TechWench[/eluser]
As noctrum pointed out, this works (note the ? in the url):
http://www.johnnyaction.ca/ci_doctrine_d...php?/blog/

Try this:
http://ellislab.com/codeigniter/user-gui...oting.html

Or this:
http://codeigniter.com/wiki/Server_URL_problems/
#7

[eluser]JohnnyAction[/eluser]
Thank you very much!! Yes, the ? did fix it. I also appreciate the articles on how to fix this.




Theme © iAndrew 2016 - Forum software by © MyBB