【发布时间】:2017-09-21 05:14:23
【问题描述】:
一天前所有项目都运行良好,我无法更改任何系统文件或类似的东西。但是现在刀片 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>
If 语句未呈现。我无法解决这个问题。有谁知道我该如何解决这个问题?
解析错误:语法错误,意外的“endif”(T_ENDIF),预期文件结尾(查看:/var/www/vhosts/mysite.site/mysite.site/resources/views/dashboard/test.blade.php )
【问题讨论】:
-
尝试运行
php artisan view:clear。 -
您使用的是什么版本的 PHP,您是否检查了您使用的 Laravel 版本的最低要求。