Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
February 28, 2008, 11:44 pm
rate this thread
Re: How to check if something is a sub-directory?
If it is direct 'descendant':
$is_subdir = realpath($dir1.'/..') =3D realpath($dir2);
If not, still apply realpath, but check with either a regex or a substri=
that the 'parent'-path is indeed at the START of the 'child'-path.
- » i am getting the php coding while running the php..
- — Next thread in » PHP Scripting Forum