Help with HTML ( easy )

11 posts Page 2 of 2
Contributors
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 444
Joined: Tue Feb 16, 2010 6:24 am

Re: Help with HTML ( easy )
Livengood
hes talking about fwrite in php. Its easy to get on.
You can do this by:
Code: Select all
//Overwrites all text.
$fp = fopen("layout/logs/chat.php", 'w');
fwrite($fp, "Writes over everything");
fclose($fp);

//Adds text to file.
$fp = fopen("layout/logs/chat.php", 'a');
fwrite($fp, "Adds to text.");
fclose($fp);

//Will print to screen.
$fp = fopen("layout/logs/chat.php", "r");
$contents = fread($fp, filesize("layout/logs/chat.php"));
fclose($fp);
					
echo $contents;
I wont do it all for you but you can figure it out from here
Image
11 posts Page 2 of 2
Return to “Tutorials”