"PHP" code function name problem, ask the great God advice

Source: Internet
Author: User
Now in the template to do a development, the template is the default code as the function name, but I do development need to get get pass the code, these two code produced a conflict, ask the great God how to deal with the advice. Template used is the daily purchase system!


Reply to discussion (solution)

One is the function name, one is the variable name?
This is not going to be a conflict.

One is the function name, one is the variable name?
This is not going to be a conflict.



Because this template is such a link at the time of the visit xx.xx.com/index.php?mod=subscribe&code=mail
Subscribe is the controller name code is the method inside the controller
And the URL passed in is xx.xx.com//index.php?mod=subscribe&code=111111dc2f0cd9cd41f0ebf0f1b225bv&state=state.

Code is a variable that comes with a URL, remember not to have the same name as this variable.

For CODE=111111DC2F0CD9CD41F0EBF0F1B225BV in the latter URL
Obviously the 111111DC2F0CD9CD41F0EBF0F1B225BV method is not present, and you can easily identify it in the dispatch

For CODE=111111DC2F0CD9CD41F0EBF0F1B225BV in the latter URL
Obviously the 111111DC2F0CD9CD41F0EBF0F1B225BV method is not present, and you can easily identify it in the dispatch




This code is passed over the parameter, I need this get value

Code is a variable that comes with a URL, remember not to have the same name as this variable.



I don't want to, but now this is the same name.

For everyone to share my solution: Now the root directory to build a file, in the request code when the file callback to the root directory, note that when the callback link is added to a field is also the link to your current page, so that you can get the code in the root directory when you receive your previous link

  • Related Article

    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.