如何在共享主机上安装 Composer?主机、如何在、Composer

2023-09-08 08:33:43 作者:如此安好

我有这些东西:

文件http://api.odtu.lu/composer.pharhttp://api.odtu.lu/phpinfo.phpftp 访问cPanelFreeBSD 上的 Cron 作业PHP、Perl、CGI-BIN、Python、Curl.

如何安装 Composer?(我的目标是安装 Restler)

How can I install Composer? (My aim is to install Restler)

我没有 SSH 访问权限.

I do not have SSH access.

推荐答案

这取决于主机,但你可能根本不能(你不能在我在 Rackspace 云站点上的共享主机上 - 我问过他们).

It depends on the host, but you probably simply can't (you can't on my shared host on Rackspace Cloud Sites - I asked them).

您可以做的是在您的开发机器上设置一个与您的共享主机大致匹配的环境,并在本地通过命令行进行所有管理.然后,当一切都设置好后(你已经引入了所有依赖项、更新、使用 git 管理等),你可以通过 (s)FTP 将其推送"到你的共享主机.

What you can do is set up an environment on your dev machine that roughly matches your shared host, and do all of your management through the command line locally. Then when everything is set (you've pulled in all the dependencies, updated, managed with git, etc.) you can "push" that to your shared host over (s)FTP.