一天前所有项目都运行良好,我无法更改任何系统文件或类似的东西。但是现在刀片if语句不起作用。
我的刀片代码是
<html>
<body>
@if($success == "True")
<script>
window.parent.successPayment();
</script>
@else
<script>
window.parent.failedPayment("{{$message}}");
</script>
@endif
渲染后
<html>
<body>
@if ($success == "True")
<script>
window.parent.successPayment();
</script>
<?php else: ?>
<script>
window.parent.failedPayment("<?php echo e($message); ?>");
</script>
<?php endif; ?>
</body>
</html>
如果声明没有呈现。我无法解决这个问题。任何人都知道如何解决这个问题?
解析错误:语法错误,意外&#39; endif&#39; (T_ENDIF),期待文件结束(查看:/var/www/vhosts/mysite.site/mysite.site/resources/views/dashboard/test.blade.php)
答案 0 :(得分:1)
Intresting
class DashboardBaseController extends Controller
{
public function __construct(){
// setlocale(LC_TIME, "turkish");
// setlocale(LC_ALL,'turkish');
//
$this->middleware(function ($request, $next) {
$user = Auth::user();
$img = DefaultProfileImage::create($user->name, 256, "#e91e63");
...
如果我评论 setlocale 行代码正常工作。
答案 1 :(得分:0)
试试吧。
<html>
<body>
@if ($success == "True")
<script>
window.parent.successPayment();
</script>
@else
<script>
window.parent.failedPayment("{{ e($message) }}");
</script>
@endif
</body>
</html>
答案 2 :(得分:0)
尝试这一个
<html>
<body>
<?php if ($success == "True") {?>
<script> window.parent.successPayment();
</script>
<?php }
else: {?>
<script> window.parent.failedPayment("<?php echo e($message); ?>");
</script>
<?php } endif; ?> </body>
</html>