The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.18 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autoload Classes
#8
well thats where its quite cool, the autoload class loads only if not loaded, I've tested the autoload required at the top of init.php along with the classes manual required at the same time and all good not issues,

in an update we can have a patch file that works like your db patch files which will hold this which places the require to the top of init.php:

<pre>
Code:
<?php
//:: This will patch your init.php from v4.2.9 :://
//:: WARNING ! BACKUP YOUR INIT.PHP BEFORE RUNNING THIS PATCH :://

require_once 'init.php';
require_once 'includes/header.php';
require_once 'includes/navigation.php';

$init = 'init.php';
$AutoLoad = '<?php require_once \'classes/class.autoloader.php\';';

$contents = file_get_contents($init);

$line = '<?php';

$contents = str_replace($line, '', $contents);
file_put_contents($init, $contents);

$lines = file($init);
$fopen = fopen($init, "w+");

fwrite( $fopen, $AutoLoad );
foreach( $lines as $line ) {
    fwrite( $fopen, "$line");
}

fclose ($fopen);

bold("<br><br>You're good to go. Delete patch file and bask in the glory.");
?>
</pre>
  Reply


Messages In This Thread
Autoload Classes - by firestorm - 07-07-2017, 08:48 AM
Autoload Classes - by mudmin - 07-09-2017, 12:12 PM
Autoload Classes - by firestorm - 07-09-2017, 01:50 PM
Autoload Classes - by mudmin - 07-09-2017, 02:10 PM
Autoload Classes - by firestorm - 07-09-2017, 02:12 PM
Autoload Classes - by firestorm - 07-13-2017, 01:09 PM
Autoload Classes - by mudmin - 07-13-2017, 01:26 PM
Autoload Classes - by firestorm - 07-13-2017, 05:46 PM
Autoload Classes - by karsen - 07-15-2017, 03:17 PM
Autoload Classes - by mudmin - 07-15-2017, 03:25 PM
Autoload Classes - by firestorm - 07-15-2017, 04:19 PM
Autoload Classes - by firestorm - 07-16-2017, 09:23 AM
Autoload Classes - by mudmin - 08-05-2017, 05:07 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)