Right now I can run a PHP script from my Mac terminal like echoing some output, creating folders etc. That is just PHP which does not take any input parameters.
Is it possible to run a PHP script with an HTML part which consists of a form for entering a username which is again posted in the PHP part so that I can create a folder name with the entered username. I wanted to test it using Terminal, not a browser on the Mac.
I just tried running the script with html part and what I get in the terminal output is that the whole html part is just reflected as output in the terminal output including the tags. Is what I want possible?
PHP does take parameters from terminal, just execute your script
./myScript.php nameand in your script $argv[1] will holdname. $argv[0] is the absolute path to the current script.Though I’m not quite sure what your script is for, you might want to read up on the php-cli… it’s far more elaborate than you seem to believe