mardy-git / redirect
此包已被废弃,不再维护。未建议替代包。
一个简单的重定向包。
v0.1.1
2013-06-07 07:16 UTC
Requires
- php: >=5.4
This package is not auto-updated.
Last update: 2015-08-05 08:48:09 UTC
README
一个简单的重定向包。
安装
要安装此包,请使用composer,将其添加到您的composer.json文件中
"mardy-git/redirect": "dev-master"
使用示例
use Mardy\Redirect\Redirect; $redirect = new Redirect; //with all options set (You can set your own headers, these are only examples) $redirect->go( "http://www.google.com", Redirect::HTTP_STATUS_302, [ 'Content-Type' => 'text/html; charset=utf-8', 'Connection' => 'keep-alive', 'Expires' => 'Thu, 19 Nov 1981 08:52:00 GMT' ... ... ... ] ); //with just the URL and status $redirect->go( "http://www.google.com", Redirect::HTTP_STATUS_302 ); //lightweight with just the URL $redirect->go( "http://www.google.com" );