
Feb 9th, 2008, 01:35
|
 |
Technical Administrator
|
|
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,799
Thanks: 2
Thanked 2 Times in 2 Posts
|
|
|
Re: Edit a specific line of a file???
This should work:
<font color="#000000"> - PHP: Select all
<?php $filehandle = fopen("template/templateHeader.inc", "r"); $file = fread($filehandle); $lines = explode("\n",$file); $lines[4] = "new line 5"; $file = implode("\n", $lines);
fputs($file, "$file"); fclose($file); ?>
|