PHPExcel and Joomla

When you try to include the PHPExcel library into a joomla article (using a plugin for inserting PHP code into an article), it doesn’t work. It displays a white screen. I found a solution for that. It maybe not the best way to fix this sinceĀ  I’ve modified the Joomla core.

Go to /libraries/loader.php and replace:

function __autoload($class)
{
if(JLoader::load($class)) {
return true;
}
return false;
}

with:

function Joomla_Autoload($class) {
if(JLoader::load($class)) {
return true;
}
return false;
}
/*** specify extensions that may be loaded ***/
spl_autoload_extensions('.php, .class.php, .lib.php');
/*** register the loader functions ***/
spl_autoload_register('Joomla_Autoload');
This entry was posted in Joomla. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.