Apache + php +rails

Hi everyone.

I am trying to integrate wordpress with rails
i create php file in the public folder of rails
whenever i try to open the php file through

a dialogue box appears instead of displying the contents of the php
the dialogue box gives me the option whether to save the file or open
the file.

can u tel me the reason for the same.