fopen fonksiyonu

Php'de bir dosyayı nasıl açarız?

<?php
$myfile 
fopen("example.txt","w");

fwrite($myfile,"That was easy!");
fclose($myfile);  
?>