Write an automatic git copy with php + bash_profile, but how to enter the string?

system("git commit -a -m "quick commit" ");
system("git push");

then build one in ~. Bash _ profile, wrote a shortcut

alias push="php /Users/XXX/Projects/XY/push.php"

but what I want to achieve is:

suppose I enter push "GOOD BADDDD"
so I can get this value in push.php and replace quick commit into GOOD BADDDD
. Is this possible?

Jul.30,2021

try the Google "php command line parameter"


in command-line mode, the number of parameters passed to the script is saved in the global variable $argc , and the parameter array is stored in the global variable $argv .

Command Line

php test.php name test sex unknow

test.php

<?php

print_r(":" . $argc);
print_r(":\n");
print_r($argv);

the above code has not been tested. For more information, please see PHP command line mode


$_ SERVER ['argv']
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e546a5-43d8b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e546a5-43d8b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?