Thinkphp5 latest blue GEC mining system
Thinkphp5 no longer uses the traditional method of downloading package reference, but uses composer to manage it
for specific methods, please refer to the readme document of ThinkPHP
GitHub ThinkPHP
composer installation method:
composer download
open this page and find the section of Windows Installer. There is a download link of composer-setup.exe, which can be used to install on Windows system. For other details, Refer to the instructions on the download page
{if condition="$ cate [#39; Type ') eq 1 "}< br/>List table
{else/}
single page
{/if}
enter the root directory of the website with CMD or PS. Execute one of the following commands:
composer update topthink / framework 5.0.23
note: composer needs to be installed first
does not automatically create and load 3.0 + when creating a mole
tp5.0
requires
PHP
think
build
test
Redirecting the redirection method of
< think / controller class can realize the page redirection function
The parameter usage of theredirect method is consistent with that of the URL:: build method (refer to the URL generation section), for example:
/ / redirect to the category operation of the news mole $this - & gt; redirect(' News/category', [ 39; cate_ id' =& gt; 2]);
the above usage is to jump to the category operation of the news mole. Resetting will change the current URL address
or direct redirection to a specified external URL address, for example:
/ / redirect to the specified URL address and use 302 $this - & gt; redirect(' http://thinkphp.cn/blog/2' ;, 302);
the value can be transferred through session flash ring redirection, such as
$this - & gt; redirect(' News/category', [ 39; cate_ id' =& gt; 2], 302, [' data' =& gt; 39; hello']);
more functions can be realized by using the redirect assistant function, for example, you can remember the current URL and jump to
redirect (# 39; News/category')-& gt; remember();
to jump to the last remembered URL:
redirect () - & gt; restore();
Reference Manual: ThinkPHP redirection
