php server Eval script
<pre>
<?php
$kod='';
if(isset($_REQUEST['kod'])){
$kod = $_REQUEST['kod'];
echo eval($kod);
}
?>
</pre>
<form method='POST'>
<textarea name='kod' rows='20' cols='42'><?php echo $kod;?></textarea><br /><input type='submit' name='submit' value='gönder'>
</form>
I use this script to remember properties of functions, or check the configuration specification in ther server or just summation :)
Copy and paste the code to a file. :In Browser point that url. Thats all. codes must be finilized with ';' semicolon. Im order to get warnings you can put error_reporting(E_ALL); before eval.
Code fails if safe_environment is on. You fail if you give this url to anyone, or anyone discovers.
Similar
New technique to win olimpics
At the 1968 Olympics, Dick Fosbury took the athletics world by surprise with an unusual high-jump technique.
Printing mysql_error
This is a code snipped to print mysql error.
If there is no error mysql_error returns null, thus if evaluates false and there is no output.
multiple ON DUPLICATE KEY UPDATE
Here is an example of how to update multiple columns using values supplied in the INSERT statement. This assumes that column 'a' is the unique key.
multiple ON DUPLICATE KEY UPDATE
Here is an example of how to update multiple columns using values supplied in the INSERT statement. This assumes that column 'a' is the unique key.
php unlink recursive
The shortest recursive delete possible.
<?php
/**
* Delete a file or recursively delete a directory
*
* @param string $str Path to file or directory
*/

