Zend Framework on shared hosting

后端 未结 12 1460
孤独总比滥情好
孤独总比滥情好 2020-12-04 17:01

I\'m new to Zend Framework. I would like to know how to implement zend framework on a shared hosting. Because of the zend framework folder structure all view files are put i

12条回答
  •  青春惊慌失措
    2020-12-04 17:53

    I encountered this problem recently and through this thread i was able to find a solution. I am using zf2. So all i had to do was have the zend related files in a directory we can name say src. This directory will reside in the public or root directory (such as /www)

    1. Create a .htaccess file in the 'src' dir and add the Deny from All directive.

    2. In the index file, change the working directory to the src folder by doing the following:

      define('SRC_ROOT', 'src');
      chdir(SRC_ROOT);
      

    ...and you are good to go!

提交回复
热议问题