Reputation: 18064
I have this Ruby script (test.rb):
print "hello"
And I have this PHP script (test.php):
$cmd = "ruby test.rb";
system($cmd);
Now I call my PHP script from CLI this way:
php test.php
And I get no output (it should print "hello")
Why?
Upvotes: 2
Views: 6455
Reputation: 15296
Its working for me, check whether both ruby script and php in the same folder and installed ruby in your machine
<?php
$cmd = "ruby test.rb";
system($cmd);
?>
Upvotes: 0