While migrating a website today, we ran into some issues. This issue was caused by the previous developers trying to “hide code” from the end users so that they could not move the website away from the marketing agency (very shady). Below is the PHP code we used to download a working copy of the “hidden” file. As you can see from the file path, it was in a location where FTP was unable to access. We use the if statement to make sure it only executes this code when we “ask it to”. This avoids any downtime on the live site.
<?php if(!empty($_GET['pull-file'])) { header("Content-Type: text/plain"); echo file_get_contents ('/var/www/includes/fb_feed.php'); exit; } ?>
© Copyright 2024 Sethmatics Websites All Rights Reserved.