Could not create file Using PHP code

This is the code I’m trying to use

<?php

$my_file = fopen("my_test.txt", 'w');



fclose($my_file );

Thank you very much for helping me

Hi @rodavid5!

I have tested the script for your website and it works the way it supposed to. Next time you are experiencing this issue please go to 000webhost cPanel > Settings > General > Repair website and try again.