-1

I'm trying to execute a PHP Script and run it from a C++ program here's my code C++:

cout << std::system("php -f http://www.php.net/manual/en/function.file-exists.php");

but it gives me this in the cmd window 'php' is not recognized as an internal or external command, operable program or batch file.

any herlp? thank you

geekslot
  • 213
  • 1
  • 4
  • 11
  • Do you have php installed on your system? I think yes, but if you want to call php so, you have to register an environment variable. Take a look at **[this link](http://stackoverflow.com/questions/17727436/how-to-properly-set-php-environment-variable-to-run-commands-in-git-bash)** – kosmos May 30 '14 at 22:15

1 Answers1

1

The PHP executable obviously isn't in your path.

Entropy
  • 64
  • 1
  • 4