$str = file_get_contents(“hello.txt”); $str = “hello world”.$str; file_put_contents(“hello.txt”,$str);