<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::get('/', function () {
return view('welcome');
});
作为框架的一部分提供给我的 web.php 代码为什么没有 ?>
最后的外壳.php
文件应该?抱歉,我是 php 和 Laravel 的新手,只是想从教科书中编写一些示例路由。
最佳答案
这可以防止在 PHP 结束标记后添加意外的空格或新行,这可能会导致不必要的影响,因为当程序员无意在脚本中的该点发送任何输出时,PHP 将开始输出缓冲
关于php - Laravel 示例 web.php 丢失?> 附件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51996560/