Is it possible to make a filename visible?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
andylyon87
Forum Contributor
Posts: 168
Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee

Is it possible to make a filename visible?

Post 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.
User avatar
Pointybeard
Forum Commoner
Posts: 71
Joined: Wed Sep 03, 2003 7:23 pm
Location: Brisbane, AUS
Contact:

Post by Pointybeard »

huh? thats very vauge. Put it into context for us....
andylyon87
Forum Contributor
Posts: 168
Joined: Sat Jan 31, 2004 5:31 am
Location: Dundee

Post 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.
Post Reply