All, My PHP Zend MVC Application structure is like this:
billingsystem
-application
-design
-public
--index.php
--.htaccess
-library
-- Zend
whenever the application loads, it goes to index.php in public folder and it gets rerouted from there.. I want to make sure users to access the system by going http://billingsystem/ instead of going to http://billingsystem/public. Is this a Zend convention to keep the public folder. or can I get rid of it and move the files to the root directory? I tried doing this, but my application failed miserably, as it's not able to find the Zend library and load it's classes.. Some of my index.php code is as under:
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library'),
get_include_path(),
)));
// Ensure include/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../include'),
get_include_path(),
)));
// Ensure application/models is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../application/models'),
get_include_path(),
)));
/** Zend_Application */
require_once 'Zend/Application.php';
require_once 'Zend/Loader.php';
//Autoload Zend Classes
Zend_Loader::loadClass('Zend_Loader_Autoloader');
Zend_Loader_Autoloader::getInstance()->setFallbackAutoloader(true);
Thanks