Delete file, prompt to delete failed, last var_bump see, file without suffix. Address: Http://localhost/2015/thinkphp/blog/User/Database/index/Action/del/file/D20160105T144608-1.sql is this, I use Var_ Dump ($_get) prints out:
Array (2) { ["Action"]=> string (3) "Del" ["File"]=> string "D20160105t144608-1"}} " Success ": 0}
To get is the value of file, Baidu Many did not find the answer, really enough depressed.
Reply to discussion (solution)
This is the TP thing, he explained the suffix separately.
You can get it yourself from $_server[' path_info ' or $_server[' Request_uri ']
This is the TP thing, he explained the suffix separately.
You can get it yourself from $_server[' path_info ' or $_server[' Request_uri ']
The previous path_info can get the entire path, and then a request_url to get the suffix, I arbitrarily in the file after the customization of a parameter automatically resolved, I really do not understand.
U (' Database/index ', Array (' Action ' = ' del ', ' file ' = = $row, ' TM ' =>1)) The parsed path is:
HTTP://LOCALHOST/2015/THINKPHP/BLOG/USER/DATABASE/INDEX/ACTION/DEL/FILE/D20160105T144608-1.SQL/TM/1 in this case, you can get the correct value for file.
Add a parameter,. sql is not a URL suffix.
Naturally, we get rid of the misunderstanding of TP.