Page 1 of 1

Checking if a Directory exsists..

Posted: Mon Aug 12, 2002 7:08 pm
by Gen-ik
..I need to check if a directory exsists, can anyone help?

Basically this is what I need to do..

CHECK IF DIRECTORY EXSISTS
IF YES DO THIS..
IF NO FO THIS INSTEAD..

Thanks.

Posted: Mon Aug 12, 2002 7:16 pm
by fatalcure

Code: Select all

if (is_dir("myDirectory")) echo "It exists"; else echo "Nope, doesn't exist";

Posted: Mon Aug 12, 2002 7:17 pm
by Gen-ik
Ahhhh.. thanks. I knew it would be simple!