php - Zend MVC - get rid of public folder -


Application - Design-Public - Index.fp -. HTX-Library-Zend

Whenever the app loads, it goes to index.php in the public folder and it is transferred from there again .. I want to make sure I have to use it instead of going to the system instead of reaching the system. Is it a Zend conference to keep the public folder? Or can I get rid of it and transfer files to the root directory? I tried to do this, but my application failed miserably because it is unable to find the Z library and it is unable to load the classes. Some of my index.php code is as follows:

  // Define the path to the application directory ('APPLICATION_PATH') || Define ('APPLICATION_PATH', actual path (dynamic name (__ file__). '/../application')); // Make sure the library contains / include_path set_include_path (implode (PATH_SEPARATOR, array (actual path (APPLICATION_PATH. '/../library'), get_include_path (),))); // Make sure / include include_path set_include_path (implode (PATH_SEPARATOR, array (actual path (APPLICATION_PATH. '/../include'), get_include_path (),))); // Make sure the application / model include_path set_include_path (implode (PATH_SEPARATOR, array (actual path (APPLICATION_PATH. '/../application/models'), get_include_path (),))); / ** Zend_Application * / require_once 'Zend / Application.php'; Need_once 'Zend / Loader.php'; // Autoload Zend Classes Zend_Loader :: loadClass ('Zend_Loader_Autoloader'); Zend_Loader_Autoloader :: getInstance () - & gt; SetFallbackAutoloader (right);  

Thank you

ZF assumes that you are in your public folder The host's document route is mandatory so that you can get your application code outside the "public" space. If you are using Apache server, you will modify the DocumentRoot command in your httpd.conf (1.x) or apache2.conf (2.x) file. There may be a DocumentRoot in your server itself, and you can also create VirtualHosts in which each has DocumentRoots Here is a decent tutorial for setting up virtual hosts for your site: There is also a good example in the Zend Wiki: < / P>


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -