简体   繁体   English

使用Composer安装Zend Framework-vendor / autoload.php?

[英]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. 我正在遵循有关如何从名为Call of Duty Elite的网站获取统计信息的教程,该网站跟踪“ Call of Duty”游戏系列中的玩家统计信息。 Here is the tutorial I am following: https://coderwall.com/p/mbrc9q 这是我正在关注的教程: 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. 我和一位服务器管理员的朋友交谈,他唯一能提供的帮助就是使用Composer安装Zend Framework。 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 . 如果您在该教程的源代码顶部注意到该文件,则该文件包括位于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? 这是只是为脚本中必需的类实现了__autoload()函数的文件,还是仅仅是我在Zend包中忽略的知名框架文件?

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. Composer将为您创建该文件。 It sets up the Composer autoloader, which will handle autoloading for all composer-installed libraries/packages. 它设置了Composer自动加载器,它将处理所有Composer安装的库/软件包的自动加载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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