Thinkphp5 does not exist because of the "module does not exist" problem caused by the thinkphp5 class name.

Source: Internet
Author: User

Thinkphp5 does not exist because of the "module does not exist" problem caused by the thinkphp5 class name.

Thinkphp5 is a perfect pitfall,

Based on thinkphp3.2.3, the function and usage have changed,

GetRedisData. php, a class file written in mac, runs normally in mac + mamp environments.

However, if you put the same file in centos, the tp will report an error and the class cannot be found.

At first, I thought it was nginx that would cause this problem. Later I found that it was the same for apache.

For information query, "class files are named by the hump Method" in the 5.0 manual. That's right, "GetRedisData" Is this the hump method?

After a long time, I accidentally changed the file name

GetRedisData

The access address is/GetRedisData /***

 

Later, I checked the manual. The url section introduced some information and sorted it out:

'url_convert'    =>  true,

If it is set to true, GetRedisData. php cannot be accessed in any case, such as getredisdata or GetRedisData.

The get_redis_data format must be used,

What logic is this?

What is the purpose of designing this set of rules?

I personally feel very unacceptable,

Since the name of the camper method cannot be accessed, What Can getredisdata access in this case?

Can only Getredisdata. php with uppercase letters be accessed?

If so, why do we need to write "class files are named by the hump Method" in the specification, and set it to true in the default url configuration?

Isn't that a waste of time?

 

If you want to cancel, you can only disable case-sensitivity conversion.

'url_convert'    =>  false,

In this case, GetRedisData can be used to access GetRedisData. php.

 

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.