Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8462105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:04:35+00:00 2026-06-10T14:04:35+00:00

i am unsing zend framework. i have a view linked to a controller, home,

  • 0

i am unsing zend framework. i have a view linked to a controller, home,

so:

application>controllers>HomeController.php

application>views>scripts>home>index.phtml

in the index.phtml page i have a link to an action in the same controller:

application>views>scripts>home>add.phtml

the code for the link is:

<a href="../application/controllers/home/add">add</a>

Not only does this not work but i am sure its not the best way to do this in zend framework.

please note i am using wamp

http://localhost/sites/url/public/home/add

when using:

<?php
    echo '<a href="' . $this->url(array('controller' => 'home', 'action' => 'add')) . '">Add Job</a>';  
?>

I get this error message:

Message: Invalid controller specified (sites)

this is whats in my htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T14:04:36+00:00Added an answer on June 10, 2026 at 2:04 pm

    Use the url helper for this:

    http://framework.zend.com/manual/en/zend.view.helpers.html

    <a href="<?php echo $this->url(array('controller' => 'index', 
                                         'action' => 'index', 
                                         'module' => 'module1')); ?>" title="test">
    

    UPDATE

    This is how your .htaccess should like:

    SetEnv ENVIRONMENT development
    
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -s [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteCond %{REQUEST_URI} !\.(css|gif|ico|jpg|js|png|swf|txt)$
    RewriteRule ^.*$ index.php [NC,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a PHP MVC application using Zend Framework. As presented in the quickstart,
All, I have a PHP Web application built using Zend Framework and MVC with
Both zend and CI framework have seperate Model, View, Controller directories. My doubt is
I'm building a web application using PHP5.3 and Zend Framework 1.9.4. i have an
I have a Zend Framework application that is making use of jQuery UI. In
I am developing an application using Zend Framework 1.11.10. I have used this article
I have been working on a new installation of a Zend Framework application for
I have PHP project and I am using Zend Framework. There is a library
I am using zend framework... so I have the following code in display.php: <?php
I have based my application upon the Zend Framework. I am using Zend_Auth for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.