I need to use this in my Rails application. I was wondering if I could
put the .php file in a Rails folder, and simply call it. Or if there’s a
way to do a similar service in Rails? And how do I write these 11 lines
in Rails ? I’m pretty new to Rails.
I need to use this in my Rails application. I was wondering if I could
put the .php file in a Rails folder, and simply call it. Or if there’s a
way to do a similar service in Rails? And how do I write these 11 lines
in Rails ? I’m pretty new to Rails.
You’ll have to configure a separate handler for it, in the Apache
configuration (or whatever Web server you use). Rails runs Ruby
natively, and the Rails router has no interest in or knowledge of PHP.
It will happily serve any static files that you place in the
app/public folder.
And how do I write these 11 lines
in Rails ? I’m pretty new to Rails.
I suggest you start by working right through a good tutorial such as railstutorial.org (which is free to use online). That will show you
the basics of rails.
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.