Re: Ruby and PHP code in html-page




On Jul 30, 2007, at 7:48 AM, Vadim Shevchenko wrote:

Wayne E. Seguin wrote:
On Jul 12, 2007, at 09:12 , Vadim Shevchenko wrote:

===========

Main web-server script-language is Ruby.
I want to include PHP-code.

Is it posiible?

Try using SSI for the php code.

SSI works super, but I have such problem:
I want to include in html-file some php-code one of counter-systems
written on PHP.
By using SSI, I must write php-code to some php-file and when this php
will be included, php-script don't know about html-file, about first
request uri.
For counter-system it's bad variant.
-- Posted via http://www.ruby-forum.com/.

It might be possible to use ERb (Ruby) to insert the PHP.
And then have the server first process files with Ruby, then with PHP.
Depends on the server. It's ugly, maybe a little slower, but probably possible.

.



Relevant Pages

  • Re: RCR to modify #puts and #print inside ERB
    ... >> #2 is much like PHP. ... >> (Ruby code) embedded in self-printing text. ... > In fact, there could only be one language at all, because the people ... >> we shifted the idea from an ERB template to an ERB program? ...
    (comp.lang.ruby)
  • Language Popularity - PHP vs Ruby?
    ... The trend seems to show that PHP is a very popular ... language compared to ruby. ... Ruby has Rails, but Rails needs more libraries, and Rails has a ...
    (comp.lang.ruby)
  • Re: Ruby vs. PHP
    ... If they hire a consultant who only recommends one technology, ... Ruby and Rails are still small compared to PHP, ... You might want to show a bit more of the ongoing history of insecurity that is a lot more rampant with PHP sites, and even recommend a little security through obscurity. ...
    (comp.lang.ruby)
  • Re: Ruby vs. PHP
    ... best solution, we're going to make prototypes in rails FAST, then port ... did lot's of work but only in PHP and he is trying to convince investor ... PHP is way to go. ... I had plenty of expirience with php and i know how strangely can be php written, and rails forces good practices like MVC, and ruby i much cleaner langue then php to begin wth ...
    (comp.lang.ruby)
  • Re: [PHP] Whats wrong the __autoload()?
    ... got better things to do than play with flashy toys for the mere purpose ... I'm too lazy to learn anything new since I already know PHP. ... I don't like Ruby. ... I got into programming for the sheer joy of programming and ...
    (php.general)

Loading