简体   繁体   中英

Installing Zend Framework with Composer - vendor/autoload.php?

I was following a tutorial on pulling stats from a website called Call of Duty Elite, which tracks player stats from the Call of Duty game series. Here is the tutorial I am following: https://coderwall.com/p/mbrc9q

I spoke with a friend who is a server-admin and the only help he could offer was with installing the Zend Framework with Composer. However, I still have one question that neither of us can seem to figure out, hopefully we've just overlooked something simple.

If you notice at the top of the source code on that tutorial, it includes a file at the location vendor/autoload.php . Is this just a file which implements an __autoload() function for the classes necessary in the script, or is a well-known framework file that I'm just overlooking in the Zend package?

My instinct tells me this is a dumb question, so I apologize ahead of time, but I'm hoping it's something simple that I'm overlooking.

Composer will create that file for you. It sets up the Composer autoloader, which will handle autoloading for all composer-installed libraries/packages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM