Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/274.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
“我该如何解决?”;语法错误,意外的文件结尾“;在我的edit.blade.php上?_Php_Laravel - Fatal编程技术网

“我该如何解决?”;语法错误,意外的文件结尾“;在我的edit.blade.php上?

“我该如何解决?”;语法错误,意外的文件结尾“;在我的edit.blade.php上?,php,laravel,Php,Laravel,我试图使用xampp将编辑页面添加到我的laravel网站,但当我尝试运行链接时,它显示“语法错误,意外的文件结尾”。这是我得到的错误: <?php echo $__env->make('master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\webLaravel\res

我试图使用xampp将编辑页面添加到我的laravel网站,但当我尝试运行链接时,它显示“语法错误,意外的文件结尾”。这是我得到的错误:

<?php echo $__env->make('master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\webLaravel\resources\views/edit.blade.php ENDPATH**/ ?>
这是我的index.blade.php上的按钮

 <td><a href="/post/edit/{{ $post->id_kategori }}"><button type="button" 
class="btn btn-edit stn-md">Edit </button></td>

由于您使用的是
get()
,因此我假设您使用的是
@foreach
来循环表中的数据。您需要确保正在使用
@endforeach
blade指令关闭
@foreach
循环。另外,请确保使用
@endif
指令关闭所有
@if

@foreach
.
.
.
.
@endforeach

由于您使用的是
get()
,因此我假设您使用的是
@foreach
来循环表中的数据。您需要确保正在使用
@endforeach
blade指令关闭
@foreach
循环。另外,请确保使用
@endif
指令关闭所有
@if

@foreach
.
.
.
.
@endforeach

从您的代码示例中可以看出,您缺少结束标记

您也不需要使用按钮和标签。试试这个

 <td>
      <a class="btn btn-edit stn-md" href="/post/edit/{{ $post->id_kategori }}"> Edit </a>
 </td>

从您的代码示例中可以看出,您缺少关闭A标记

您也不需要使用按钮和标签。试试这个

 <td>
      <a class="btn btn-edit stn-md" href="/post/edit/{{ $post->id_kategori }}"> Edit </a>
 </td>


可能重复的错误消息将告诉您问题出在哪个文件上。是否缺少关闭标签<代码>可能重复的错误消息将告诉您问题出在哪个文件上。是否缺少关闭
标记<代码>