Skip to content

Latest commit

 

History

History
11 lines (10 loc) · 207 Bytes

php_cli_with_arguments.md

File metadata and controls

11 lines (10 loc) · 207 Bytes

PHP command line with arguments

Place this in file.php:

<?php
if ( !empty( $argv[ 1 ] ) ) parse_str( $argv[ 1 ], $_POST ); // or $_GET

Command line:

./file.php "arg1=val1&arg2=val2"