Executing php code in rails app

OK I'm not even going to ask why you would want to do that, but you can keep your files wherever you like, and just execute them as scripts. But they won't work in that same way ruby scripts do with other ruby scripts, you can use functions written in PHP and call them directly in Ruby, you'd need to execute an entire script.

If you don't mind me asking, why the heck would you want to do this???

If you have some massive legacy app or something, I can't imagine why you'd be porting "bits" of it to rails. You could also always write a web sevice with SOAP or XML or something and connect to that with Ruby and then use that...

Long and the short of it, you can call any php script with something like: exec 'php filename.php'

Cam