php - zend framework problem with paths -


I have installed the Zend Framework on my local machine. I have configured a vhost in httpd.conf and my host file ( 127.0.0.1 mysite) has added a line. I'm running Windows 7 Everything works right The problem is that when I upload to a host server, the path is found. I am uploading a zf-framework on a remote DIR. I would like to type this URL to use the index page. This index displays the page, but when I add a link to the page, they are similar and actually it should be when it should be. I have found a job for this situation ... to use echo $ the-> baseUrl (link) I have layout in fluff. If it comes to submitting the form then the problem is more serious. I can not use baseUrl there .... or I do not know how to use it. Is there a way to write some common config accessories so that it can be automatically resolved by the framework. Do we call something in index.php or bootstrap.php, which will automatically correct the path?

If you are using Zend_Application, add the following to your configs / application.ini file .

resources.frontController.baseUrl = "/ your-path-here"

If you are not using 'Zend_Application' then it is in your bootstrap or index.php file Please.

  $ front = Zend_Controller_Front :: getInstance (); $ Front & gt; SetBaseUrl ('/ own-path-here');  

You will not have to use the same action and controller (except the action attribute in the form tag only), or when using a $ -> baseUrl () when submitting a form or redirector action Using Assistant However, the links in your visual script will require you to get $ -> baseUrl ('/ url-without-base'), which I do not mind very much.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -