RSS Forums RSS
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 1856 | Replies: 10 | Thread Tools  Display Modes
Join Date: Jul 2007
Posts: 126
Reputation: Designer_101 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
Designer_101 Designer_101 is offline Offline
Junior Poster

Question php reading a text file ..... help

  #1  
Nov 18th, 2007
hi, im having a bit of trouble learning php. My script is working but it is showing the amount of characters i am echoing out....heres the code.

$tireorder = 'you have ordered: '.$tireqty.' tires.' ;

//open the file and check to see if it exists//
$fp = fopen("file.txt","r+");
if(!$fp) {
echo "Your order could not be prossesed at this time";
exit;
}
//writing to a file//
fwrite($fp, $tireorder);

//closing the file//
fclose($fp);

//reading the file//
$data = @readfile("file.txt");


//echoing out//
echo $data;

?>


It writes to the text file - you have ordered: {tire amount} tires. {character amount}
Is there anyway to get rid of the character count?

all suggestions will help thanx
AddThis Social Bookmark Button
Reply With Quote  

Only community members can participate in forum threads. You must register or log in to contribute.



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 4:03 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC