【问题标题】:Live server error: InvalidArgumentException in FileViewFinder.php line 137: View [welcome] not found实时服务器错误:FileViewFinder.php 第 137 行中的 InvalidArgumentException:未找到查看 [欢迎]
【发布时间】:2016-04-26 03:20:06
【问题描述】:

我开发了一个在本地机器上运行良好的 Laravel 应用程序。 本地是windows,live server是linux。

在现场它会给出类似的错误

FileViewFinder.php 第 137 行中的 InvalidArgumentException: 查看 [欢迎] 未找到。

在 FileViewFinder 中仍然采用 Xampp/htdocc/xxx 路径

FileViewFinder->findInPaths('welcome', array('C:\xampp\htdocs\CRM\resources\views', '/mnt/data/vhosts/casite-673772.cloudaccess.net/httpdocs/CRM/app \Modules\User\Views')) 在 FileViewFinder.php 第 79 行

【问题讨论】:

  • “欢迎”视图是否存在并且可供网络服务器访问?
  • 是的,它存在并且可以访问@lagbox
  • 这个欢迎视图的文件名是什么?
  • 它的welcome.blade.php @lagbox 并且在本地Windows 服务器上运行良好。
  • 在 Linux 机器上尝试php artisan cache:clear

标签: php linux laravel model-view-controller


【解决方案1】:

@thanks 我已经通过类似的路线完成了

Route::get('/cmd', function () {
    chdir('../');
    $dir =  getcwd();
    print_r($dir);
    $cmd = shell_exec ('php artisan cache:clear');
    return $cmd;
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-04-29
    • 2015-09-24
    • 1970-01-01
    • 1970-01-01
    • 2016-12-27
    • 2020-02-15
    • 2018-10-06
    相关资源
    最近更新 更多