I have some code written in php and that is placed in my public folder
with .php extension.
Is there a way to call that file?
Thanks,
Ratnavel.
I have some code written in php and that is placed in my public folder
with .php extension.
Is there a way to call that file?
Thanks,
Ratnavel.
Ratnavel S. wrote:
I have some code written in php and that is placed in my public folder
with .php extension.Is there a way to call that file?
Thanks,
Ratnavel.
[1] Open app/helpers/application_helper.rb
[2] paste it under module ApplicationHelper
def link_to_file(name, file, *args)
if file[0] != ?/
file = “#{@request.relative_url_root}/#{file}”
end
link_to name, file, *args
end
[3] In your view, put it:
<%= link_to_file "teapoci file here", "teapoci.php" %>
Enjoy,
http://teapoci.blogspot.com
Reinhart
you could download the file and then print outs its results
On Sat, May 3, 2008 at 7:44 AM, Rails T.
On 3 May 2008, at 12:42, Ratnavel S. wrote:
I have some code written in php and that is placed in my public folder
with .php extension.Is there a way to call that file?
Do you just want the user to be able the view the result of executing
that page (in which case it’s probably just a matter of setting up
apache etc… properly) or do you want to execute the php code
yourself and do something with the results yourself (in which case the
easiest way may be to just run the file through the php executable).
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs