Tuesday, July 28, 2009

How can I use php to open a file after a certain condition is met?

I want the script to open a file after a certain condition has been met. So far, I have:


%26lt;?php


$file== $_GET['file'];





if ($file%26gt;%26lt;"1"")


echo "Incorrect file!";


else


if ($file=="2")


open file;


?%26gt;





What do I put at the part that says "open file;"?

How can I use php to open a file after a certain condition is met?
Look at the php manual for file functions, it varies according to what you want to do with the file and the type of file.


No comments:

Post a Comment