Jump to content

Archived

This topic is now archived and is closed to further replies.

carraras

Bringing two files together

Recommended Posts

In my index.php file I have the code:
[code]if($action=="Rename")
require_once("rename.php");[/code]

Let's say rename.php has code of:
[code]<? $first="one"; echo $first; ?>[/code]

I want to combine the two files. If it was a simple include, then I would have no problem.
[i]How would I [b]combine[/b] the two in index.php?[/i]

Thank you,
Sam

Share this post


Link to post
Share on other sites
do you mean like this?

index.php
[code]
if($action=="Rename") {
  $first="one";
  echo $first;
}
[/code]
if that's not what you mean then be more specific

Share this post


Link to post
Share on other sites
Sounds right. I just didn't know if [color=green][i]require_once[/i][/color] was much different than [color=blue][i]include[/i][/color].

Thank you.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.