Yii2 using Phpexcel to export form times wrong

Source: Internet
Author: User

is to use composer installation finished phpexcel, report such a mistake is how to return

Add:
1. The code package is installed through composer, Yii2 requires a namespace, Phpexcel is not with a namespace,
2. The test file quoted phpexcel.php file when the error, reported "Namespace missing?",
3. I added the namespace, and this time I reported another mistake, "Class ' commonextensionsphpexcel_calculation ' not Found",
4. I went to find this class, find him in the calculation.php file, and then I put the calculation.php file to add a namespace introduced, but still report this fault, how broken how broken,
5. I changed the calculation.php file name to phpexcel_calculation.php, and then I got the error in the picture.

Reply content:

is to use composer installation finished phpexcel, report such a mistake is how to return

Add:
1. The code package is installed through composer, Yii2 requires a namespace, Phpexcel is not with a namespace,
2. The test file quoted phpexcel.php file when the error, reported "Namespace missing?",
3. I added the namespace, and this time I reported another mistake, "Class ' commonextensionsphpexcel_calculation ' not Found",
4. I went to find this class, find him in the calculation.php file, and then I put the calculation.php file to add a namespace introduced, but still report this fault, how broken how broken,
5. I changed the calculation.php file name to phpexcel_calculation.php, and then I got the error in the picture.

Hint written by xxx func not found

' You this error is not found relative to the class dependent class for find '.

First confirm whether the installation is successful and see if the code package is downloaded.
Then according to YII2 to introduce the package in the class mechanism {take an example laravel composer download good after you need to configure cofing/app.php file}
And then test it if it doesn't work.

Write a test directly for the PHP file test is useful

1. Go inside to see if this class is not in, if you require introduce phpexcel before calling the portal file

This does not seem to be installed with composer, if it is directly available. You check to see if this is composer installed.

  • 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.