Web Hosting Kerala - Support Forums - Cochin Web Hosting
September 09, 2010, 01:49:33 PM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Cochin Web Host is in Orkut
Home
Help
Search
Login
Register
Web Hosting Kerala - Support Forums - Cochin Web Hosting
>
Others
>
Script Library
>
PHP Scripts
>
Write data to a text file
Pages: [
1
]
« previous
next »
Print
Author
Topic: Write data to a text file (Read 358 times)
Ansal
Global Moderator
Newbie
Posts: 27
Write data to a text file
«
on:
February 28, 2009, 11:16:09 AM »
<?php
$your_data = "This is the data to be stored in the text file.";
// Open the file and erase the contents if any
$fp = fopen("textfile_name.txt", "w");
// Write the data to the file
fwrite($fp, $your_data);
// Close the file
fclose($fp);
?>
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> Announcements
=> Pre-Sales Questions
=> Technical Support
===> Linux Shared Hosting
===> Windows Shared Hosting
=> Tutorials / How to?
===> Video Tutorials
=> Customer Testimonials
=> Suggestions
-----------------------------
Others
-----------------------------
=> Script Library
===> ASP Scripts
===> ASP.Net Scripts
===> PHP Scripts
=> Software Downloads
Loading...