Code: Select all
define ('DIRECTORY','../../../cis');
include ('queue.php');
function using($pathTree=NULL){
$objQueue = new Queue;
$objQueue->Queue();
$path=ereg_replace("\.","/",$pathTree).".php";
search($path,DIRECTORY,&$objQueue);
}Moderator: General Moderators
Code: Select all
define ('DIRECTORY','../../../cis');
include ('queue.php');
function using($pathTree=NULL){
$objQueue = new Queue;
$objQueue->Queue();
$path=ereg_replace("\.","/",$pathTree).".php";
search($path,DIRECTORY,&$objQueue);
}is there any need to explicit call to the constructor? isn't Queue( ) constructor calling twice?crystal ship wrote:Code: Select all
$objQueue = new Queue; $objQueue->Queue();
I didn't understood what exactly is the problem and what are you trying to achieve, but you have syntax error in your code. I think following would be correct:define ('DIRECTORY','../../../cis');
include ('queue.php');
function using($pathTree=NULL){
$objQueue = new Queue;
$objQueue->Queue();
$path=ereg_replace("\.","/",$pathTree).".php";
search($path,DIRECTORY,&$objQueue);
}
Code: Select all
define ('DIRECTORY','../../../cis');
include ('queue.php');
function using($pathTree=NULL){
$objQueue = new Queue();
$path=ereg_replace("\.","/",$pathTree).".php";
search($path,DIRECTORY,$objQueue);
}
function search($path, $folder, &$queue) {
....
}Code: Select all
define ('DIRECTORY','../../../cis');
include ('queue.php');
function using($pathTree=NULL){
$objQueue = new Queue();
$path=ereg_replace("\.","/",$pathTree).".php";
search($path,DIRECTORY,$objQueue);
}
function search($path, $folder, &$queue) {
....
}