我可以不用 Composer 安装 Laravel 吗?

我想知道是否我可以安装或使用 Laravel PHP 框架在任何 Web 服务器上,而不使用 作曲家(PHP 包/依赖管理器)每次?

我希望能够把我的应用程序下降到任何网络服务器(像一个共享的服务器没有访问命令行)。

如果我第一次(在本地)运行 composer install,那么所有的依赖项都应该存在,对吗?

然后,我应该能够把它放到任何服务器上的所有文件(包括供应商目录) ?

66358 次浏览

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.

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.

You cannot install laravel local without composer in your project.

Just download the zip file from github and upload to your htdoc and voilà it will work for you

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.

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.

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

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.

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 directory on the server with your code. it will work for you same as in your local environment.

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

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.