Laravel-语法错误,文件意外结束 [英] Laravel - syntax error, unexpected end of file
问题描述
我有一个可以在主机上正常运行的网站,但是我目前正在尝试将其安装在本地主机上.
I have a website which works fine on host, but I'm currently trying to install it on localhost.
我已经下载了所有内容,并配置为可以在localhost上使用-数据库&网址.
I've downloaded everything and configured to work on localhost - Database & URL.
问题是此错误:
未处理的异常
Unhandled Exception
消息:
语法错误,文件位置意外结束:
syntax error, unexpected end of file Location:
C:\ Program Files(x86)\ EasyPHP-12.1 \ www \ laravel \ view.php(386): eval()在第118行上的代码
C:\Program Files (x86)\EasyPHP-12.1\www\laravel\view.php(386) : eval()'d code on line 118
我不知道是什么原因造成的.有解决方案吗?
And I don't know what causes it. Any solutions?
P.S.我已经在Windows的主机文件127.0.0.1 myproject.dev
中进行了设置.
P.S. I've setup in my windows' host file 127.0.0.1 myproject.dev
.
推荐答案
您的一个视图中存在错误.如果有一个更详细的堆栈跟踪,它应该为您显示视图的详细信息,尽管名称将是一个md5()
字符串,所以很难找到它.您可能要删除storage/views
中所有已编译的Blade视图,然后让Blade重新编译视图.
There is an error within one of your views. If there is a more detailed stack trace it should show you details of a view, although the name will be an md5()
string so it's a bit hard to find. You might want to delete all compiled Blade views in storage/views
and let Blade re-compile the views.
如果仍然出现错误,请检查视图以确保具有所有正确的结束标记,例如@endif
或@endforeach
If you still get the error then check your views to make sure you have all the proper closing tags, e.g., @endif
or @endforeach
请始终仔细检查您的视图是否存在语法错误.
Always double check your views for any syntax errors.
这篇关于Laravel-语法错误,文件意外结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!