Convert PHP code into Ruby!
RSS icon Email icon Home icon
  • include

    Posted on April 29th, 2009 RubyLove No comments

    The include() statement includes and evaluates a specified file. The difference between include() and require() is that require() results in a Fatal Error upon failure, whereas include() does not, it only produces a Warning.

    include() is not a function in PHP, it is a language construct.

    PHP

    include('../config.php');

    Ruby

    include('../config.rb');
  • require

    Posted on April 26th, 2009 RubyLove No comments

    The require() statement includes and evaluates a specified file. The difference between require() and include() is that require() results in a Fatal Error upon failure, whereas include() does not, it only produces a Warning.

    require() is not a function in PHP, it is a language construct.

    PHP

    require ('../config.php');

    Ruby

    require ('../config.rb');