php 我可以在不使用 Composer 的情况下安装 Laravel 吗?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15940140/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can I Install Laravel without using Composer?
提问by ryanwinchester
I'd like to know if I can install or use the LaravelPHP framework on any web server without using Composer(PHP package/dependency manager) every time?
我想知道我是否可以在任何 Web 服务器上安装或使用LaravelPHP 框架而无需每次都使用Composer(PHP 包/依赖项管理器)?
I would like to be able to drop my app on to any web server (like a shared server without access to the command line).
我希望能够将我的应用程序放到任何 Web 服务器上(例如无法访问命令行的共享服务器)。
If I run composer install
the first time (locally), then all the dependencies should be present, correct?
如果我composer install
第一次运行(本地),那么所有依赖项都应该存在,对吗?
Then, I should be able to drop it onto any server with all of the files (including the vendor directory)?
然后,我应该能够将它放到任何带有所有文件(包括供应商目录)的服务器上?
采纳答案by Dwight
If you really wanted to, you could do all the work that Composer does manually, but you definitely should not. Installing Composer is easy, it's just a matter of getting the composer.phar
file and running commands on it.
如果您真的愿意,您可以手动完成 Composer 所做的所有工作,但您绝对不应该这样做。安装 Composer 很简单,只需获取composer.phar
文件并在其上运行命令即可。
You do not need to run Composer on your server as well as locally, once you run composer install
or composer update
your project will have all its dependencies available and you can just upload it straight to your server.
您不需要在服务器上和本地运行 Composer,一旦运行composer install
或composer update
您的项目将拥有其所有依赖项,您就可以将其直接上传到您的服务器。
回答by Flávio H. Ferreira
You cannot install laravel local without composer in your project.
你不能在你的项目中安装没有 composer 的 laravel local。
回答by Stefan
On this site you can download everything what you can download also with the composer build tool. But you do not need a composer installation. Of course laravel is also present there: https://php-download.com/package/laravel/laravel
在此站点上,您还可以使用 Composer 构建工具下载您可以下载的所有内容。但是您不需要 Composer 安装。当然 laravel 也存在那里:https://php-download.com/package/laravel/laravel
回答by Prashant Barve
If you have shared server and you are not able to install composer and run cmd to install a new package or update an existing package.
如果您有共享服务器并且无法安装 composer 并运行 cmd 来安装新包或更新现有包。
You can one thing by installing composer on your local machine and install(ex composer require package/name
) or update(ex composer update package/name
) all the packages, then upload your vendor directoryon the server with your code. it will work for you same as in your local environment.
您可以通过在本地机器上安装 composer 并安装(ex composer require package/name
)或更新(ex composer update package/name
)所有包,然后将您的供应商目录与您的代码上传到服务器上来做一件事。它将为您工作,就像在您的本地环境中一样。
NOTE:I strongly recommend that you should use the Laravel with the composer, it is an important part of laravel and you can try to convince your client to provide a server that supports laravel. Please check the link below and you can find the server requirements. https://laravel.com/docs/5.5#installation
注意:我强烈建议您将 Laravel 与 Composer 一起使用,它是 Laravel 的重要组成部分,您可以尝试说服您的客户提供支持 Laravel 的服务器。请检查下面的链接,您可以找到服务器要求。https://laravel.com/docs/5.5#installation
回答by Akshay Khale
If you don't want to use composer on server then you will have to run composer install/update and download all the libraries locally and then manually upload all those files on the server i.e. Vendor Directory.
如果您不想在服务器上使用 composer,那么您必须运行 composer install/update 并在本地下载所有库,然后手动将所有这些文件上传到服务器上,即供应商目录。
In-Case of shared hosting where you can't connect to server with shh there you might have to do that but it will take lot of time to upload all the files on server so I would recommend that you should composer and then download the libraries through composer install/update.
在共享主机的情况下,您无法使用 shh 连接到服务器,您可能必须这样做,但是将所有文件上传到服务器上需要很多时间,因此我建议您应该编写并下载库通过作曲家安装/更新。
回答by shasi kanth
Yes, you can install all project dependencies via composer in your localhost first, and then transfer all the files via FTP to your actual website.
是的,您可以先在本地主机中通过 composer 安装所有项目依赖项,然后通过 FTP 将所有文件传输到您的实际网站。
回答by Harshal Lonare
Just download the zip file from githuband upload to your htdoc and voilàit will work for you
只需下载从GitHub zip文件,并上传到您的htdoc和瞧它会为你工作