开发者

Zend problems creating controller

开发者 https://www.devze.com 2023-03-09 12:38 出处:网络
I\'m new to zend, so I\'m working through this tutorial here. If you skip to about 1:10, he creates a new contoller, and then types the name of it in the url.

I'm new to zend, so I'm working through this tutorial here. If you skip to about 1:10, he creates a new contoller, and then types the name of it in the url. This brings up the appropriate view. All good. However, when I do it I get a big NOT FOUND and this 'The requested URL /cube was not found on this server'. Any ideas on what I'm doing wrong.

Sorry if this is a little vague, if you need more details, let me know.

Here's a few you may need:

Server: Xampp

OS:开发者_开发百科 Windows Vista 32bit

Zend version: 1.11.6


Do you have correctly configured .htaccess file in the project's root directory? Take a look at this. You have to have mod_rewrite enabled in Apache. This can be done by editing the httpd.conf file, which should be in the Apache installation folder. Then you should add a .htaccess file into the root folder of you project with the following content:

RewriteEngine on
RewriteBase /
RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php

Or alternatively one can use ZF without mod_rewrite. To do so, configure front controller this way:

Zend_Controller_Front::getInstance()->setBaseUrl('/url/to/app/index.php')


Try something like this on DOS command line:

SET PATH=%PATH%;C:\wamp\bin\php\php5.3.0    
C:\>wamp\www> C:\wamp\www\ZendFramework\bin\zf.bat create controller test

use correct path for zf.bat and php

If still some problem then comment out this line in application.ini and try again

;includePaths.library = APPLICATION_PATH "/../library"

I faced this problem earlier. Look at this post. Hope this will help.

0

精彩评论

暂无评论...
验证码 换一张
取 消