将Laravel项目部署到托管

时间:2018-08-31 18:16:41

标签: php laravel deployment composer-php

我下载了该存储库,并试图将其部署在主机上。我在服务器上移动了文件。根看起来像这样:

require __DIR__.'/../lsapp/bootstrap/autoload.php';
$app = require_once __DIR__.'/../lsapp/bootstrap/app.php';

在我的public_html / index.php中,我有:

Warning: require(/home/platne/serwer22093/lsapp/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /home/platne/serwer22093/lsapp/bootstrap/autoload.php on line 17



Fatal error: require(): Failed opening required '/home/platne/serwer22093/lsapp/bootstrap/../vendor/autoload.php' (include_path='.:/usr/local/php56-fpm/lib/php') in /home/platne/serwer22093/lsapp/bootstrap/autoload.php on line 17

但是我有一个错误:

composer update --no-scripts

我不知道如何解决它。 也许我应该在cmd中使用'composer' is not recognized as an internal or external command,但出现错误:composer install。 输入Could not open input file: composer时,我有fileName = input("Paste file name here") with open(fileName) as inputFile: data = inputFile.readlines() inputFile.close() for i, line in enumerate(data): searchPhrase1 = input("what phrase are you looking for?") if searchPhrase1 in line: for l in data[i:i:3]: print (l) print

有人可以帮我部署这个项目吗?

1 个答案:

答案 0 :(得分:1)

首先,您需要进入托管服务器和install composer,完成后就可以运行 composer 命令。

如果在尝试运行它时仍然找不到作曲家,则可能需要将其添加到PATH变量,同时还要检查您的PHP版本( php -v )是否与Laravel {{ 3}}。