I need to transfer one php file to another folder. For example:
I have a folder naming sample inside it there are two folders naming folderA and folderB, inside folderA there is folderC and inside it there are folders 1,2 and 3 and test.php
the file
I need to transfer is inside folder 3...
So I need to transfer it in folderB ...
I have already tried to transfer it and also I have changed the path for each include and require that I used... but still there is an error..
Fatal error: Class
'C_test'
not found in/var/www/html/sample/folderA/folderC/folder3/trial.php
on line 68
Class C_test
is inside test.php
I think there is a problem regarding my autoload function..? here is my codes for my autoload function..
set_include_path(get_include_path() . PATH_SEPARATOR . '../../.');
function __autoload($className){
$filePath = str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
$includePaths = explode(PATH_SEPARATOR, get_include_path());
foreach($includePaths as $includePath){
if(file_exists($includePath . DIRECTORY_SEPARATOR . $filePath)){
require_once $filePath;
return;
}
}
}
I need help...