开发者

Issue with links (like a href) in Zend

I've got a problem with Zend Framework, when calling an action.

This action is called "uploadvideo" inside a controller called "UploadInterfaceController". Therefor the view is called "uploadvideo.phtml".

Now all this is wrapped in a module called "Upload".

The problem is, that I cannot call a link inside the uploadvideo.phtml. I tried following co开发者_如何转开发de:

<a href="<?php echo $this->url(array('action'=>'uploadvideo','controller'=>'Uploadinterface','module'=>'upload',)); ?> "

and it produces me a nice clean URL (webroot/public/upload/UploadInterface/videoupload).

.

But

A dispatcher-error occurs, which I can't explain:

Zend_Controller_Dispatcher_Exception: Invalid controller class ("Upload_UploadinterfaceControll") [...]

I don't get it, where ZF is getting the "Upload_" prefix. I tried renaming the Controllers (and the representing entries in .zfproject.xml) but it stays the same.


If you are using modules, your controllers need to have the module name as a prefix (except for the default module).

So your upload module controllers class names need to start with "Upload_".


The error states "Invalid Controller Class" are you sure you are extending Zend_Controller_Action?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜