小编Mar*_*hma的帖子

Laravel dd输出仅带有脚本

dd('asd')使用脚本标记的响应,而不是纯字符串.对于其他php变量也dd()只有脚本标签的输出(没有html标签).因此,它的预览看起来也像响应一样.我正在使用wampserver 3.1.0.早期它与php 7.1工作正常,但当我切换到7.0时,这个问题正在发生.Xdebug扩展已启用 -

[xdebug]
zend_extension ="c:/wamp64/bin/php/php7.0.23/zend_ext/php_xdebug-2.5.5-7.0-
vc14-x86_64.dll"

xdebug.remote_enable = On
xdebug.profiler_enable = On
xdebug.profiler_enable_trigger = On
xdebug.profiler_output_name = cachegrind.out.%t.%p
xdebug.profiler_output_dir ="c:/wamp64/tmp"
xdebug.show_local_vars=1
Run Code Online (Sandbox Code Playgroud)

响应看起来像这样 -

<script> Sfdump = window.Sfdump || (function (doc) { var refStyle = doc.createElement('style'), rxEsc = /([.*+?^${}()|\[\]\/\\])/g, idRx = /\bsf-dump-\d+-ref[012]\w+\b/, keyHint = 0 <= navigator.platform.toUpperCase().indexOf('MAC') ? 'Cmd' : 'Ctrl', addEventListener = function (e, n, cb) { e.addEventListener(n, cb, false); }; (doc.documentElement.firstElementChild || doc.documentElement.children[0]).appendChild(refStyle); if (!doc.addEventListener) { addEventListener = function (element, eventName, callback) { element.attachEvent('on' …
Run Code Online (Sandbox Code Playgroud)

php laravel-5.3

6
推荐指数
2
解决办法
1787
查看次数

标签 统计

laravel-5.3 ×1

php ×1