PHP Learning : How to Create text file in php - Publik Talk

Breaking

An informative website for every one.

Post Top Ad

Post Top Ad

Thursday, August 3, 2017

PHP Learning : How to Create text file in php

Description:

The file "check.txt" should be created in the same directory where this PHP code resides. 
PHP will see that "check.txt" does not exist and will create it after running this code.


Code:

<?php

$myfile='check.txt';  

$handle = fopen($myfile, "w") or die ('connot open file: '.$myfile);  

?>  




No comments:

Post a Comment

Post Top Ad