return response('hello webman');
}
}
```
response函數(shù)實(shí)現(xiàn)如下:
```php
function response($body = '', $status= 200, $headers = array())
{
return new Response($status, $headers, $body);
}
```
你也可以先創(chuàng)建一個(gè)空的`responsereturn redirect('/user');
}
}
```
redirect函數(shù)實(shí)現(xiàn)如下:
```php
function redirect($location, $status= 302, $headers = [])
{
$response = new Response($status, ['Location' => $location]);
if (!