Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can concat two files???

Status
Not open for further replies.

diembi

Programmer
Sep 22, 2001
238
ES
Hello!!!
I'm trying to concatenate two files in php.

Thanks.
 
As simple as this:


$a=readfile("filea");
$b=readfile("fileb");

$fp=fopen("output","w");
fwrite($fp,$a.$b);
fclose($fp);

Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top