在没有 ssh 访问服务器的情况下使用 Composer

Use Composer without ssh access to server(在没有 ssh 访问服务器的情况下使用 Composer)
本文介绍了在没有 ssh 访问服务器的情况下使用 Composer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在无法使用 ssh 仅 ftp 访问的廉价网络空间上运行 composer?

Is it possible to run composer on a cheap webspace that can't be accessed using ssh, only ftp?

运行 system('php composer.phar install'); 理论上应该可以工作 - 这是推荐的方法吗?

Running system('php composer.phar install'); should work in theory - is that the recommended method?

推荐答案

我认为最好的方法,正如之前评论中所建议的,是在能够执行此操作的本地系统上执行 composer 步骤,然后上传通过 FTP 获取结果.

I think the best way, as suggested in the comments before, is to execute the composer step on a local system that is able to do it, and then upload the result via FTP.

Composer 具有一些(可能是可选的)软件依赖项,这些依赖项很可能在您的网络空间中不可用.例如,它需要 Git 和 SVN 客户端软件,以防您要安装的项目引用此类依赖项.

Composer has some (probably optional) software dependencies that most likely will not be available on your webspace. For example it needs the Git and SVN client software in case the project you are about to install references such dependencies.

另一件事是从 Github(或其他任何地方)下载可能会失败.或者触发 API 限制并要求登录.

Another thing is that downloading from Github (or anywhere else) can fail. Or trigger the API limit and ask for a login.

您真的想收集所有软件并知道它可以工作,而不是希望它能够在远程很好地执行.

You'd really want to collect all the software and know that it worked instead of hoping it will execute well remotely.

这篇关于在没有 ssh 访问服务器的情况下使用 Composer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)