Executing Ruby script from PHP and getting output

前端 未结 2 874
鱼传尺愫
鱼传尺愫 2021-01-15 04:51

I have this Ruby script (test.rb):

print \"hello\"

And I have this PHP script (test.php):

$cmd = \"ruby test.rb\";
system($         


        
2条回答
  •  借酒劲吻你
    2021-01-15 05:27

    Its working for me, check whether both ruby script and php in the same folder and installed ruby in your machine

    
    

提交回复
热议问题