You need to create a file, write information to it and save it to a specific folder.
At the root of the file is created
$file = "$index.php"; if (!file_exists($file)){ $fp = fopen("$file", "w"); fwrite($fp, $text); fclose($fp); }
In the folder I need - no
$file = "/modules/erps/include/scripts/cron/$index.php"; if (!file_exists($file)){ $fp = fopen("/modules/erps/include/scripts/cron/$file", "w"); fwrite($fp, $text); fclose($fp); }
What am I doing wrong?