Lol5916 Posted August 24, 2008 Share Posted August 24, 2008 <?php $l = file_get_contents("admin/admin.php"); $s = $_POST['rand']; $pp = str_replace("replacethis", $s, $l); $fw = fopen("admin/admin.php", "w"); fwrite ($fw, $pp); fclose($fw); copy("admin/admin2.php",$s); unlink("admin/admin2.php"); ?> EDIT:Now the only thing the script doesn't do is copy and delete the file, it just deletes it. Link to comment https://forums.phpfreaks.com/topic/121128-solved-script-doesnt-do-anything/ Share on other sites More sharing options...
DarkWater Posted August 24, 2008 Share Posted August 24, 2008 The whole thing is wrong. First of all, you delete admin2.php right after using copy()...(which you used wrong anyway, use file_put_contents()). Link to comment https://forums.phpfreaks.com/topic/121128-solved-script-doesnt-do-anything/#findComment-624426 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.