I used a standalone directory on my server with Perl scripts to dynamically create files.
Say this directory was in a standalone directory for security reasons ( /server/back/scripts) I used to access it using exec ( /server/back/scripts/auto.pl $arguments)
The contents of auto.pl:
system('cp /server/back/includes/default /server/front/ann/'.$enc.'.php');
system('chmod 555 /server/front/ann/'.$enc.'.php');
system("perl -pi -e 's/string/".$key."/g' /server/front/ann/".$enc.".php");
This script copy-paste the default file with the garbage values to the public directory and replace the garbage values with something else when setting the rights that we want.
How can I reproduce this on Heroku? - if not possible, is there any way to at least reproduce the behavior of this script?
source
share