Is it a good thing to put the core code of ZendFramework2 together with the project code?

Source: Internet
Author: User
I have been using thinkphpCIYii and ZF1 for more than half a year since I graduated from the php training school. I found that their core code is separated from the project code, that is, they are placed under two main directories. You can even put the core code in the root directory to run the project to improve security !...

I have been using thinkphp CI Yii and ZF1 for more than half a year since I graduated from the php Training School. I found that their core code is separated from the project code, that is, they are placed under two main directories. You can even put the core code in the root directory to run the project to improve the security mechanism! I would like to leave a question: is it a good thing to put ZF2's core code and project code together?

Note:

Thinkphp: use include (PATH) to introduce the entry file.

CI: The downloaded source code is separated from the application and will be developed in the future.

Yii: Command Line-> yiic webapp (PATH) (project name) where to place the core code at will, as long as you specify the path to the server directory.

ZF1: Command Line-> zf create project (PATH) (project name) is the same as Yii

However, the core code of ZF2 must be stored in the ZendSkeletonApplication-master \ vendor \ ZF2 directory to run properly (that is, under the project directory ).

You have attempted to install ZF2 using javasde_path :( ZF2 core code path) in php. ini.

But it does not work. The same error is reported!

This is a reference from http://avnpc.com/pages/zend-framework-2-installation-for-windows!

Reply content:

I have been using thinkphp CI Yii and ZF1 for more than half a year since I graduated from the php Training School. I found that their core code is separated from the project code, that is, they are placed under two main directories. You can even put the core code in the root directory to run the project to improve the security mechanism! I would like to leave a question: is it a good thing to put ZF2's core code and project code together?

Note:

Thinkphp: use include (PATH) to introduce the entry file.

CI: The downloaded source code is separated from the application and will be developed in the future.

Yii: Command Line-> yiic webapp (PATH) (project name) where to place the core code at will, as long as you specify the path to the server directory.

ZF1: Command Line-> zf create project (PATH) (project name) is the same as Yii

However, the core code of ZF2 must be stored in the ZendSkeletonApplication-master \ vendor \ ZF2 directory to run properly (that is, under the project directory ).

You have attempted to install ZF2 using javasde_path :( ZF2 core code path) in php. ini.

But it does not work. The same error is reported!

This is a reference from http://avnpc.com/pages/zend-framework-2-installation-for-windows!

Thank you for your invitation. I wrote the tutorials referenced by the subject. The tutorial aims to build an environment in the shortest time. Many details are not mentioned, therefore, you should read the official documents and tutorials of ZF in detail after running Hello world to obtain more complete information.

On the project homepage of ZendSkeletonApplication, the installation method of the ZF2 project has been described. Two installation methods are recommended for the ZF2 project:

I. Use Composer

git clone git://github.com/zendframework/ZendSkeletonApplication.gitcd ZendSkeletonApplicationphp composer.phar self-updatephp composer.phar install

Ii. Use GIT

Git clone git: // github.com/zendframework/ZendSkeletonApplication.git -- recursive

No matter which method is used for installation, the core code of ZF2 in the project is referenced through the GIT Submodule and won't be mixed with the project code, therefore, the code library of your ZF2 project does not contain bloated ZF2 core code, which is downloaded only when the development or production environment is installed.

For security issues, the directory bound to the Web server ispublicZF2 project files and core code directories are outside of this folder, so users do not have permission to accesspublicOtherwise, there is no security problem.

If you restrict the http Service permission to/public, the Framework library is no different in/vendor or other paths.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.