I have wrote a PHP program for the command line. Currently it is using STDIN for input, but in this case I need it to read from a file. How do I pass the file onto the program in an argument if I'm using the command line?Currently I execute my programs using:php -f ./myprogram.php
did you try this way :php -f ./myprogram.php <myfile.txtwhere "myfile.txt" has each item you entered (one line per input).
|VIEW ORIGINAL||REGISTER||GET FREE HOSTING|