Discuz Forum and Phpexcel component conflict resolution

Source: Internet
Author: User
Tags autoload

Due to business needs,DiscuzX3.2 Forum Plug-in development needs to use the phpexcel component to read the data in the execl spreadsheet, found in the actual development, the phpexcel When a component is placed on a single page, the data in the spreadsheet is read successfully, but the call fails when integrated into the Discuz plug-in architecture.

Error message:

discuz! System Error

oops! System file lost:class/phpexcel/phpexcel_shared_string.php

Causes of conflict:

Both Discuz and phpexcel use the PHP class's autoload technology to automatically register classes, but Discuz blocks spl_ Autoload_call the calling process.

Workaround:

Modify the source\class\class_core.php file to find the public static function AutoLoad ($class) function and put the bottom Discuz_error::exception_error ($EXC); Comment out. Such as:

Discuz Forum and Phpexcel component conflict resolution

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.