# Ruby equivalence for php include("file.php");

**URL:** <https://rubytalk.org/t/ruby-equivalence-for-php-include-file-php/45033>\
**Category:** ruby-talk\
**Created:** [7 March 2008 17:22 UTC](https://rubytalk.org/t/ruby-equivalence-for-php-include-file-php/45033 "2008-03-07T17:22:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miquel](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Miquel](https://rubytalk.org/u/Miquel)\
**Post date:** [7 March 2008 17:22 UTC](https://rubytalk.org/t/ruby-equivalence-for-php-include-file-php/45033/1 "2008-03-07T17:22:54Z")

</div>

Hi there

I'm doing some RoR exercices to begin a website and I want to include a  
file which contains the header template. I have coded using php  
before and I know it's done using include("file.php") and I don't know  
how to do it.

How do you include a html template into another one (I haven't found  
anything googling)?

Thanks in advance

Regards

> **···**
>
> --
> 
> Miquel (a.k.a. Ktalà a.k.a. Ton)  
> Linux User #286784  
> GPG Key : 4D91EF7F  
> Debian GNU/Linux (Linux wolverine 2.6.22.5)
> 
> Welcome to the jungle, we got fun and games  
> Guns n' Roses

---

<div class="post-metadata">

**Author:** ![Avdi\_Grimm1](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Avdi\_Grimm1](https://rubytalk.org/u/Avdi_Grimm1)\
**Post date:** [7 March 2008 17:27 UTC](https://rubytalk.org/t/ruby-equivalence-for-php-include-file-php/45033/2 "2008-03-07T17:27:37Z")

</div>

Miquel Oliete wrote:

> I'm doing some RoR exercices to begin a website and I want to include a  
> file which contains the header template. I have coded using php  
> before and I know it's done using include("file.php") and I don't know  
> how to do it.

This is the Ruby mailing list. The Ruby on Rails mailing list is what you want: [http://groups.google.com/group/rubyonrails-talk](http://groups.google.com/group/rubyonrails-talk)

Any good (or even mediocre) RoR tutorial will tell you how to do this. Hint: 'render :partial'.

> **···**
>
> --  
> Avdi

---

<div class="post-metadata">

**Author:** ![Miquel](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Miquel](https://rubytalk.org/u/Miquel)\
**Post date:** [7 March 2008 17:56 UTC](https://rubytalk.org/t/ruby-equivalence-for-php-include-file-php/45033/3 "2008-03-07T17:56:41Z")

</div>

Thanks for your hint and let me abuse of your kindness and knowledge  
asking which are the differences between 'render :partial' and 'render:  
file'

Thanks again 😃

Regards

> **···**
>
> On Sat, 8 Mar 2008 02:27:37 +0900 Avdi Grimm wrote:
> 
> > This is the Ruby mailing list. The Ruby on Rails mailing list is what  
> > you want: [http://groups.google.com/group/rubyonrails-talk](http://groups.google.com/group/rubyonrails-talk)
> > 
> > Any good (or even mediocre) RoR tutorial will tell you how to do this.  
> > Hint: 'render :partial'.
> 
> --
> 
> Miquel (a.k.a. Ktalà a.k.a. Ton)  
> Linux User #286784  
> GPG Key : 4D91EF7F  
> Debian GNU/Linux (Linux wolverine 2.6.22.5)
> 
> Welcome to the jungle, we got fun and games  
> Guns n' Roses

---

<div class="post-metadata">

**Author:** ![Avdi\_Grimm1](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@Avdi\_Grimm1](https://rubytalk.org/u/Avdi_Grimm1)\
**Post date:** [7 March 2008 18:10 UTC](https://rubytalk.org/t/ruby-equivalence-for-php-include-file-php/45033/4 "2008-03-07T18:10:01Z")

</div>

> Thanks for your hint and let me abuse of your kindness and knowledge  
> asking which are the differences between 'render :partial' and 'render:  
> file'

> **[ActionController::Base](https://api.rubyonrails.org/classes/ActionController/Base.html#M000452)**
>
> Action Controller Base Action Controllers are the core of a web request in Rails.

> **···**
>
> --  
> Avdi

---

<div class="post-metadata">

**Author:** ![Miquel](https://avatars.discourse-cdn.com/v4/letter/m/e495f1/32.png) [@Miquel](https://rubytalk.org/u/Miquel)\
**Post date:** [7 March 2008 18:33 UTC](https://rubytalk.org/t/ruby-equivalence-for-php-include-file-php/45033/5 "2008-03-07T18:33:36Z")

</div>

Thanks a lot Avdi, I was reading this page when I received your answer.

Regards

> **···**
>
> On Sat, 8 Mar 2008 03:10:01 +0900 Avdi Grimm wrote:
> 
> > \> Thanks for your hint and let me abuse of your kindness and knowledge  
> > \> asking which are the differences between 'render :partial' and 'render:  
> > \> file'
> > 
> > [ActionController::Base](http://api.rubyonrails.org/classes/ActionController/Base.html#M000452)
> > 
> > --  
> > Avdi
> 
> --
> 
> Miquel (a.k.a. Ktalà a.k.a. Ton)  
> Linux User #286784  
> GPG Key : 4D91EF7F  
> Debian GNU/Linux (Linux wolverine 2.6.22.5)
> 
> Welcome to the jungle, we got fun and games  
> Guns n' Roses
