Total members 9950 | Gratitudes |It is currently Sat Feb 11, 2012 2:51 am Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 1 post ] 
Author Question
 Question subject: Append to file using php
PostPosted: Thu Jul 26, 2007 8:47 am 
Offline
Mastermind
User avatar

Joined: Tue Mar 27, 2007 10:55 pm
Posts: 2103
Location: Earth
Has thanked: 39 time
Have thanks: 56 time

Hi all ,,,

This is the code for appending data into text file using php
Code:
<?

$myname
="DATA TO WRITE";
$fh = fopen("f.txt", 'a') or die("Can't open $file for writing: $php_errormsg");



if (-
1 == fwrite($fh, $myname)) { die("Can't write to $file:
$php_errormsg"
); }
fclose($fh) or die("Can't close $file: $php_errormsg");



?>

_________________
Currenlty programming with : java , html , php , and javascript . (OCJP-6 certified )


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 1 post ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 How to make PHP form data saved into txt file  PHP  Radu  6
 file exists in upper level folder link  HTML examples  msi_333  0
 How to merge the data into file  Java  Anonymous  1
 How to use xml file to populate listbox  C#  Anonymous  1
 File Permission  PHP  Anonymous  1

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 1 guest



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team