chdir() then dir() class will this open current directory?
Posted: Tue Jul 29, 2003 2:31 pm
Hello,
I have created a function the opens a dir
if $BASEPATH = /root/
and $category = /category/
and $folder = /folder/
would $dir = dir('.') = /root/category/folder/ ? Im having bit of a problem accessing some folders that i no are there i can't even seem to get a realpath(dir)
how is the chdir used with the dir() class??
Kendall
I have created a function the opens a dir
Code: Select all
<?php
// define root path
chdir($BASEPATH); // set the current directory
// if there is a category
if(isset($category))
chdir($category); // set current directory
// if there is path
if(isset($folder) && $folder != false)
chdir($folder);// set current directory
return $dir = dir('.'); // open directory
?>and $category = /category/
and $folder = /folder/
would $dir = dir('.') = /root/category/folder/ ? Im having bit of a problem accessing some folders that i no are there i can't even seem to get a realpath(dir)
how is the chdir used with the dir() class??
Kendall