Can i call a .php or .aspx files from rhtml page?

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 Sundaramurthi 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

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