Skip to content

Commit 2a71f04

Browse files
authored
Create php_cli_with_arguments.md
1 parent ad46383 commit 2a71f04

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

php_cli_with_arguments.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
## PHP command line with arguments
2+
3+
Place this in file.php:
4+
```php
5+
<?php
6+
if ( !empty( $argv[ 1 ] ) ) parse_str( $argv[ 1 ], $_POST ); // or $_GET
7+
```
8+
Command line:
9+
```sh
10+
./file.php "arg1=val1&arg2=val2"
11+
```

0 commit comments

Comments
 (0)