PDA

View Full Version : PHP: dir pls



Luckyrare
14-03-2006, 06:03 PM
HI!

I just want some advice on what function to use.

Okay I want to check if the file exists, I would just use an if statement to see if the file can be found.

should I use dir, readdir or opendir?

Thanks bbz
IF U NEWB PLS DONT REPLY.

Splinter
14-03-2006, 07:10 PM
I take it you are trying to look for a file.. so I amsume you mean --


if(file_exists(file.php)) {
echo "File found";
}
else {
echo "Nope cant find it!";
}

although I would think you knew this..

Luckyrare
14-03-2006, 07:43 PM
Yes, I knew there was one but I was searching under dir.

Tim linked me on messenger, thanks anyway. Thread closed.

Want to hide these adverts? Register an account for free!