I need to execute a php file with parameters through shell.
here is how I would run the php file:
php -q htdocs/file.php
You need to read command line parameters from $argc and $argv.
Using a question mark is something you do in a URL and has nothing to do with executing PHP from a command line.
See also: http://www.sitepoint.com/php-command-line-1/