Deprecated: autoload() is deprecated, use spl autoload register() instead. How to replace this (my automatic class autoloader)
Problem...
function __autoload($myclass)
{
$myrootpath=$_SERVER['DOCUMENT_ROOT'];
$mypath= $myrootpath.'/clg_lms/config/';
$dirlink = array('myclass/');
foreach ($dirlink as $calsses)
{
if(file_exists($mypath.'/'.$calsses.$myclass.'.php'))
{
require_once ($mypath.'/'.$calsses.$myclass.'.php');
}
}
return;
}
How to replace this (my automatic class autoloader)
Solution...
spl_autoload_register(function($myclass) {
$myrootpath=$_SERVER['DOCUMENT_ROOT'];
$mypath= $myrootpath.'/clg_lms/config/';
$dirlink = array('myclass/');
foreach ($dirlink as $calsses)
{
if(file_exists($mypath.'/'.$calsses.$myclass.'.php'))
{
require_once ($mypath.'/'.$calsses.$myclass.'.php');
}
}
return;
});
Today we will learn how to verify email id while signup. it's very important for the real user. You ..
This is a common problem for those of you who are new to coding. While coding we often make some syn..
Warning: session start() [function.session-start]: Cannot send session cache limiter - headers alrea..
Before we use the PDO, we will know why we will use PDO.PDO Only supports object-oriented.It has man..
Deprecated: autoload() is deprecated, use spl autoload register() instead. How to replace this (my a..
getimagesize() is a PHP function that returns an array containing information about the size and typ..
Today we will know - How to login with otp in php. Here we will use php,mysql & ajax. Before tha..
Get the latest news and updates by signing up to our daily newsletter.We won't sell your email or spam you !