raphael75 Posted February 24, 2014 Share Posted February 24, 2014 We have a server with windows 2008 R2 with PHP5 installed. I can run php files from the command line using php -f file.php with no problem. However, when I try to run PHP code inline nothing happens: php -r 'echo "hello world";' Literally no output. Do I need to configure something in php.ini to get the -r to work? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/286481-command-line-r-not-working-on-windows/ Share on other sites More sharing options...
Solution .josh Posted February 24, 2014 Solution Share Posted February 24, 2014 try swapping the quotes. php -r "echo 'hello world';" Quote Link to comment https://forums.phpfreaks.com/topic/286481-command-line-r-not-working-on-windows/#findComment-1470418 Share on other sites More sharing options...
raphael75 Posted February 24, 2014 Author Share Posted February 24, 2014 try swapping the quotes. php -r "echo 'hello world';" That worked, thank you! Quote Link to comment https://forums.phpfreaks.com/topic/286481-command-line-r-not-working-on-windows/#findComment-1470436 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.