Yii2 using require (_ DIR _. '/../IState. php') cannot find class?

Source: Internet
Author: User
1. Yii2 uses the require () function to introduce the file, but the system prompts that the class cannot be found. isn't it so useful? 2. what should I do if I want to implement the call method? 3. does Yii2 call the folder method? Yii1 some, after calling this folder, the package in this folder...

1. Yii2 uses the require () function to introduce the file, but the system prompts that the class cannot be found. isn't it so useful?

2. what should I do if I want to implement the call method?

3. does Yii2 call the folder method? Yii1. after this folder is called, all classes and methods in this folder can be used.

Supplement: The method shown in the figure is OK when I use it on ecshop, but the class cannot be found on yii2.

Reply content:

1. Yii2 uses the require () function to introduce the file, but the system prompts that the class cannot be found. isn't it so useful?

2. what should I do if I want to implement the call method?

3. does Yii2 call the folder method? Yii1. after this folder is called, all classes and methods in this folder can be used.

Supplement: The method shown in the figure is OK when I use it on ecshop, but the class cannot be found on yii2.

Obviously, you have a problem with the class path and use the namespace to handle it.

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.