For example -
If there is a file named Hello.txt in the server and in side hello.txt the numerical 1 is present
So when i click the "change value" button i want my code to check the numerical which is allready there in hello.txt and change according to that.
So if 1 is already present in hello.txt when i click the "change value" button i want the numerical value in hello.txt to change to 2
And keep changing by +1 there after until it reaches 10 and then if hello.txt numerical value is 10 i want a specific file on my server deleted
$myFile = "hello.txt";
$fh = fopen($myFile, 'w') or die("can't open file");
$stringData = "1";
fwrite($fh, $stringData);
fclose($fh);
Thats to overwrite a file
#example "/files/example.exe"
$DelFilePath = $setup["serverWebrootPath"] . $fileName;
# delete file if exists
if (file_exists($DelFilePath)) { unlink ($DelFilePath); }
Thats to delete a file if it exists

New Topic/Question
Reply




MultiQuote






|