How does thinkphp fail to get the file suffix when deleting a file?

Source: Internet
Author: User
How does thinkphp fail to get the file suffix when deleting a file? When you delete a file, the system prompts that the file failed to be deleted. at last, var_bump saw that the file did not contain a suffix. Address: http: // localhost/2015/thinkphp/blog/User/Database/index/Action/del/file/D20160105T144608-1. SQL is this, I use var_dump ($ _ GET) printed:
array(2) {  ["Action"]=>  string(3) "del"  ["file"]=>  string(18) "D20160105T144608-1"}{"success":0}

I want to get the file value. Baidu has not found the answer, which is really depressing.


Reply to discussion (solution)

This is the thing about TP. he Explained the suffix separately.
You can obtain it from $ _ SERVER ['path _ info'] or $ _ SERVER ['request _ URI '].

This is the thing about TP. he Explained the suffix separately.
You can obtain it from $ _ SERVER ['path _ info'] or $ _ SERVER ['request _ URI '].


The previous path_info can get the entire path, and the last request_url cannot get the suffix. I will customize a parameter after the file to automatically parse it. I really don't understand it.
U ('database/Index', array ('action' => 'del', 'file' => $ row, 'TT' => 1 )) the resolved 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 of file.

With another parameter,. SQL is not the suffix of the url.
Naturally, we can get rid of the misunderstanding of TP.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.