can anyone help me with this ?
i'm following a zend framework tutorial http://www.youtube.com/watch?v=BOwSfKXKpZQ quickstart (2) I seem to have everything working ok and have craeted a new project called square and can acceess the index page ok - "http://127.0.0.1:8888/square/".
I have also created a new controller called Test , but when i try and access it - "http://127.0.0.1:8888/square/test" i get a 404 error ?? i've tried to solve this but cant seem to get anywhere ??
looks easy on the tutorial !
im using EasyPHP as my testing server.
thanks in advan开发者_开发知识库ce
It looks like you've dropped your Zend project in the "square" directory, which will work for the index controller but other routes will not match. The "/square/test" route is most likely looking for SquareController::testAction.
What I didn't see at the beginning of that youtube demo is where he set up the virtual host. I'm not familiar with EasyPHP, so there might be an easier way to do it, but you can give your site a local name, we'll call it "square.local", and then you don't have to include the square prefix in the url.
VirtualHost Config:
<VirtualHost *:8888>
ServerName square.local
DocumentRoot /path/to/www/square
</VirtualHost>
Also add square.local to your windows hosts file (C:\Windows\system32\drivers\etc\hosts):
127.0.0.1 localhost square.local
Now you can go to http://square.local to get to IndexController. http://square.local/test to get to TestController, etc.
To start: in applications/configs/application.ini
, set
resources.frontController.params.displayExceptions = 1
so that the 404 page can report what module/controller/action the system thinks is being requested.
精彩评论