2

我在使用 artisan/packages 时遇到了一些问题。我已将一个包添加到我的作曲家文件中并运行composer update,但返回了一个错误:

PHP Warning: require(/home/xxx/public_html/bootstrap/autoload.php): failed to open stream: No such file or directory in /home/xxx/public_html/artisan on line 16

我可以看到 require 路径不正确,我的结构是这样的:

/home/xxx/bootstrap
/home/xxx/app
/home/xxx/vendor
/home/xxx/public_html

我没有更改任何路径,并且使用这种结构,一切似乎都是开箱即用的,基本上删除了公用文件夹并将所有内容推送到目录中。

我已经打开了 Artisan 尝试了一些一直失败的路径,所以我将它们更改为绝对:

require '/home/xxx/bootstrap/autoload.php';

它似乎从这里开始工作,但在过程结束时出现另一个错误:

Writing lock file
Generating autoload files

[RuntimeException]
Could not scan for classes inside "app/commands" which does not appear to be a file n or a folder

与其继续把它搞砸,我认为现在是清理它的好时机,有什么想法可以解决这个问题吗?

4

2 回答 2

0

尝试创建一个空的“app/commands”文件夹,为我解决了这个问题!

于 2013-12-05T02:25:58.687 回答
0

确保您使用的是 php 5.3 或更高版本。

运行 php -v

于 2013-11-05T20:53:17.410 回答