当我调用控制器时,输出的输出是:
{success:true}
而不是:
{成功:真)
我已经尝试了grep,并找到了这样的东西:" <?php",我什么也没有。
我继续了我添加的每一堂课,确保他们没有打印,也没有打印。
从我发现这一点到现在已经三个小时了。我对源代码管理/没有任何提示
怎么才能调剂呢?
如果没有,我能钩住拉拉直到我发现问题并通过某种拦截使其消失吗?
更新
我转到了文件: public/index.php,并将其放在:
ob_start();
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$output = ob_get_clean();//$output will have the 4 spaces因此,现在问题是隐藏的,但仍然需要修复它,因为$output有4个隐藏空间。
更新2
整个文件
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
ob_start();
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$output = ob_get_clean();//$output will have the 4 spaces
$response->send();
$kernel->terminate($request, $response);谢谢
发布于 2019-07-18 12:29:18
请检查您的config/filesystems.php文件,我认为在php打开标签之前有一个选项卡(或4个空格)。
发布于 2020-02-28 18:58:27
您必须使用Phpstorm进行全面搜索--例如,搜索
\r<?php \n<?php [space]<?php \t<?php在我的例子中,我的routes.php中有一个\n
https://stackoverflow.com/questions/39468328
复制相似问题