Created
October 10, 2022 02:47
-
-
Save tranchausky/609f85c9ddca8ab885469cab03f99092 to your computer and use it in GitHub Desktop.
php get parameter when run in bash
This file contains hidden or 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 | |
| //php .\get_param.php 123 | |
| if (php_sapi_name() === "cli") { | |
| var_dump($argv[1]); | |
| }else{ | |
| exit('Not allow'); | |
| } | |
| //123 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment