note 23414 added to function.fputs

From: Date: Wed, 17 Jul 2002 21:23:38 +0000
Subject: note 23414 added to function.fputs
Groups: php.notes 
Request: Send a blank email to php-notes+get-33226@lists.php.net to get a copy of this message
im trying to write to a file called affiliate.txt, instead its writing to affiliatetxt ... i checked the script and all the dots are there do i need to put some special thing in there? this is what m doing: $string="hello"; $fp= fopen(affiliate.txt,"aw"); fputs($fp, $string); fclose($fp); also for people who dont know much about php like me you can't just go fputs(what you want to save); you need to open the file from with in fputs (i used $fp and then write you data... it makes it neater if you use a variable for this to then you need to close the $fp any way i dont know much php im writing my first script -- http://www.php.net/manual/en/function.fputs.php http://master.php.net/manage/user-notes.php?action=edit+23414 http://master.php.net/manage/user-notes.php?action=delete+23414 http://master.php.net/manage/user-notes.php?action=reject+23414

« previous php.notes (#33226) next »