I want to prevent the running of x.php
but I can't see how to do it in cPanel. I also can't see how to do it the .htaccess
. How can I do this?
My suggestion would be to modify the file with a run key that only you know.
<?php
if (!isset($_GET['runkey']) || ($_GET['runkey'] != my-secret-value)) {
die("You do not have permission to run this script");
}
Then when you wanted to run the script, you'd call it with
Change the file's permissions so it is not executable. You can do this from either cPanel, FTP (right-click the file and change permissions) or from the command line (chmod).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.