I am getting problem in this function of Yii framework YiiBase.php file.Working fine with mysql, with sql server it gives warning
include( .php) [<a href=‘function.require’>function.require</a>]: failed to open stream: No such file or directory
line highlighted in the following code. What I can i do to remove this.
public static function autoload($className)
{
//echo $className;
//exit;
// use include so that the error PHP file may appear
if(isset(self::$classMap[$className]))
include(self::$classMap[$className]);
else if(isset(self::$_coreClasses[$className]))
include(YII_PATH.self::$_coreClasses[$className]);
else
{
// include class file relying on include_path
if(strpos($className,'\\')===false) // class without namespace
{
if(self::$enableIncludePath===false)
{
foreach(self::$_includePaths as $path)
{
$classFile=$path.DIRECTORY_SEPARATOR.$className.'.php';
if(is_file($classFile))
{
include($classFile);
break;
}
}
}
else{
[b]//Getting problem here[/b]
include($className.’.php’);
//echo $className;
}
}
else // class name with namespace in PHP 5.3
{
$namespace=str_replace('\\','.',ltrim($className,'\\'));
if(($path=self::getPathOfAlias($namespace))!==false)
include($path.'.php');
else
return false;
}
return class_exists($className,false) || interface_exists($className,false);
}
return true;
}
Thanks
Abhay