File put contents

17 Ⅴ 2010

file_put_contents() is in php nowadays, but if youíre on an old server you may need your own.
This simply checks if the functionís there, and if not it makes the function.

// Replacement for file_put_contents if it doesn't exist
	function file_put_contents($file, $data){
		$fp = fopen($file, 'w');
		fwrite($fp, $data);