Search code examples
phpcommand-lineeasyphp

Can EasyPHP take command line arguments?


I want to write a PHP program that takes an argument from the command line but am not sure how it's done. I use EasyPHP for development, do I need something different?

In the user notes it says you can

$ php -f somefile.php a=1 b[]=2 b[]=3

But when I try something like this (even php -i) it says php is not a recognized program. What do I need to do?


Solution

  • I'm not familiar with easyphp, but it sounds like you need to find php.exe (probably in the folder where you installed easyphp) and add it to your Path settings in windows.