laravel 5.3 中的 echo({!! ... !!} 和 {{...}})有何不同?
How different echo ({!! ... !!} and {{...}}) in laravel 5.3?
在laravel 5.3中,有时我用这个:{!! ... !!}
,有时我用这个:{{ ... }}
我用的时候还不错
我想问一下,两者有什么区别?
来自 Laravel 5.3 文档
Displaying Unescaped Data
By default, Blade {{ }} statements are automatically sent through PHP's htmlentities function to prevent XSS attacks. If you do not want your data to be escaped, you may use the following syntax:
Hello, {!! $name !!}.
在laravel 5.3中,有时我用这个:{!! ... !!}
,有时我用这个:{{ ... }}
我用的时候还不错
我想问一下,两者有什么区别?
来自 Laravel 5.3 文档
Displaying Unescaped Data
By default, Blade {{ }} statements are automatically sent through PHP's htmlentities function to prevent XSS attacks. If you do not want your data to be escaped, you may use the following syntax:
Hello, {!! $name !!}.