About paging issues with the Thinkphp3.2 version

Source: Internet
Author: User

Recent Company official website revision, need to change the old thinkphp version to now the latest 3.2 go, therefore, carried out a series of upgrade work. While modifying the namespace, it is found that the page paging class can function correctly, but the paging link is wrong, for example, in the admin module of the article Controller's index action, it should have generated admin-article-index-p-xx (number) link is correct, But it generates ARTICLE-INDEX-P-XX, which means that fewer modules are in front of the URL.

After finding a piece of information and found that it did not make much effect, see the page class to create a link in the code, found that the page URL property is generated by the U method, then use the Xdebug breakpoint into the U, and finally found the segment key code:

  

$module =   defined$module$url    =   __app__. ' /‘. ($module? $module. MODULE_PATHINFO_DEPR: "). implode ($depr,array_reverse($var));

This code means that, if the bind_module is defined, the module in the URL will become an empty string, looking back, found their index entry file actually defined this constant, immediately removed, all ok! Originally also want to change his page code, fortunately found early, or change the kernel is not good!

About paging issues with the Thinkphp3.2 version

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.