How do you execute a PHP script from the command line?
Make sure your path includes the php bin folder.
Via windows?? or Linux??
He (she) said command line so I would assume he's talking about Windows...
@NardCake, but of course Linux too has commandline. Unless my brain is playing tricks on me!!
set a path using:-
set PATH = %PATH%;c:\xampp\php //temporary setting a path
Control Panel > System > Advanced System Settings > Environment Variables > look for and highlight the Path variable and click Edit.Append the PHP folder path //permanent setting a path
After setting a path run your code using:-
script-folder> php your-script-name.php
but of course Linux too has commandline. Unless my brain is playing tricks on me!!
When mentioning linux, he would probably have named it "shell" instead.
Aaahh, ok .... point noted.
Or "Terminal" :)
Yes the phrase command line is most often associated with the Windows CMD.