Re: ruby / rails within a php site

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Would this work?

$contents = file_get_contents('
http://localhost/path_to_ruby_installation/rubyfile');
then print out the contents wherever you want to?

.... or something similar, basically, we get the html output of the ruby file
over http, since this will run your ruby/rails installation the way it
expects to be run...

Thoughts?

Luke.

On Wed, Mar 4, 2009 at 9:02 AM, dg <daneane@xxxxxxxxxxxxx> wrote:

> If it's html that Ruby generates, you could probably call that file as an
> include?
>
> Something like...
>
> $ruby = file_get_contents('rubyfile.html');
>
> then where ever in the document you want that content use:
> <?php print "$ruby"; ?>- Show quoted text -
>
>
> On Mar 3, 2009, at 9:56 PM, ravi Ruddarraju wrote:
>
>  I have a regular php site. I also have a ruby / rails application. Now I
>> want to put the HTML generated by ruby / rails application within a <div>
>> section of a php page. This should be similar to like calling a php
>> function
>> within a <div> section, which would produce the HTML output of the php
>> function.
>> Is such a thing possible between php and ruby / rails? Any help will be
>> appreciated.
>>
>> Thanks
>> ravi
>>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux