我如何“解决"问题? PHP的工匠? [英] How do I "fix" php artisan?

查看:65
本文介绍了我如何“解决"问题? PHP的工匠?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Laravel5.只要我键入

I'm using Laravel 5. Whenever I type

php artisan tinker

我得到预期输出的字母c:

I get the expected output preceded by a letter c:

cPsy Shell v0.5.2 (PHP 5.6.10-1+deb.sury.org~trusty+1 — cli) by Justin Hileman

当我键入php artisan

我得到的第一行如下:

cLaravel Framework version 5.1.16 (LTS)

这封信以某种方式显示在我的所有视图上,也弄乱了我的项目.当我单击查看页面源代码"时,在"<!DOCTYPE html>"之前看到字母"c",但在我的任何文件中都找不到它.

Somehow that letter is displaying on all the views I have, so is messing up my project. When I click on "View Page Source" I see the letter 'c' before the "<!DOCTYPE html>" but I can't find it on any of my files.

推荐答案

尝试一下技巧:

在您选择的控制器方法中输入以下代码:

put in a controller method of your choice this code:

header('x-my-header: whatever');

如果一切顺利,PHP将无法发送标头,并在错误消息中写入文件和输出("c")开始的行.

If all goes well PHP will fail to send the header, and write in the error message the file and the line where the output (the "c") started.

注意:如果您使用输出缓冲,则此方法将无效.

这篇关于我如何“解决"问题? PHP的工匠?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆