scripts7com

Change index V.2 - scripts7.com

Jan 19th, 2016
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.32 KB | None | 0 0
  1.  <?php
  2.  
  3. #// scripts7.com
  4. #// twitter.com/scripts7com
  5. #// Change index.php to whatever you want  V.2
  6. #// You can just type : /index.php and gonna touch index.php for you!
  7. #// OR Just type the all path of whatever you want!
  8. #
  9. #
  10. # YOU NEED TO PUT THE ALL PATH NOT JUST /index.php  EX: /home/user/public_html/index.php
  11. #$s7 = "/home/user/public_html/css/" #<---! 777 or 755
  12. $s7 = "/home/scripts7com/public_html/test/index.php";
  13. #// Number 1-1 :  Don't change "w" just leave it like that
  14. $fi = fopen( $s7, "w" );  
  15. if( $fi == false )
  16. {
  17.     #// if doesn't work then will see this error
  18. echo " Make Sure it's 755 or 777 ";
  19. exit();
  20. #// exit if doesn't work
  21. }
  22. #// but " IF IT WORK THEN " change this one "scripts7.com  \n" to whatever you want
  23. fwrite($fi, "scripts7.com \n" );
  24. fclose($fi );
  25. #// Number 2-1 :
  26. #// Now In this one " you need to copy the path as same as " Number 1-1 : "
  27. $s7 = "/home/scripts7com/public_html/test/index.php";
  28. $fi = fopen( $s7, "r" );
  29.      
  30. if( $fi == false )
  31. {
  32.     #// IF you see this error , means ' we can't open the file to edit it but ? WE CAN Write into it :(
  33. echo ( "We can't open the file .. " );
  34. exit();
  35. }
  36. #// Number 3-1 : If you see this one , means " DONE "
  37. $f = filesize( $s7 );
  38. $ft = fread( $fi, $f );
  39. fclose( $fi );
  40. echo "The File Name : $s7 <h3> has been changed";
  41. ?>
Add Comment
Please, Sign In to add comment