Reputation: 15
On the 000webhost.com server
This is the code
<?php
$my_file = fopen("my_test.txt", 'w');
fclose($my_file );
I thank those who help me in advance
Upvotes: 1
Views: 46
Reputation: 157
Use the function chmod https://www.php.net/function.chmod
$file = "my_test.txt";
$fp = fopen($file, 'w');
fwrite($fp, $content);
fclose($fp);
chmod($file, 0777);
Note* fwrite is optional in your case if you need to enter some data in file
Upvotes: 1