123456789101112131415161718192021222324 |
- <?php
- $binPath = realpath(__DIR__ . "/" . '../mtdowling/jmespath.php/bin/jp.php');
- $contents = file_get_contents($binPath);
- $contents = preg_replace('{^#!/.+\r?\n<\?(php)?}', '', $contents, 1, $replaced);
- if ($replaced) {
- $contents = strtr($contents, array(
- '__FILE__' => var_export($binPath, true),
- '__DIR__' => var_export(dirname($binPath), true),
- ));
- eval($contents);
- exit(0);
- }
- include $binPath;
|