Page 1 of 1

Is it possible to make a filename visible?

Posted: Mon Feb 02, 2004 7:48 am
by andylyon87
I need to be able to see the file name, as it will be radom, however, I do not want it to be accessible by this. More as a reference number than anything else.

Posted: Mon Feb 02, 2004 7:53 am
by Pointybeard
huh? thats very vauge. Put it into context for us....

Posted: Mon Feb 02, 2004 8:18 am
by andylyon87
I am in the process of creating a chat room for me and my friends (just like a bulletin board really), it relies on randomfile creation however, I will need to see the file I am writing to to allow others to join a conversation. So basically all I want is a code to show a file name in this case $str:

Code: Select all

function WriteToFile($firstname){
         $str= md5(time().MD5(rand(100, 489754)).time());
         $Open = fopen ($str,"a");
         if($Open){
                   fwrite ($Open,"$firstname");
                   fclose($Open);
Thats just a snippet, but you should get the jist.