PHP How to pass a file?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phpquestion
Forum Newbie
Posts: 3
Joined: Tue Aug 17, 2010 2:49 am

PHP How to pass a file?

Post by phpquestion »

a.html file code:

Code: Select all

<html>
<body>
This is content, I would like to embed into another file.
</body>
</html>
Another PHP file:

Code: Select all

<?php 
function insert($file) {
   echo "<html><body>a.html file contents are:  ".$file." --finished a.html.</body></html>";
}

insert(?????);    // How to pass the value here? 
?>
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: PHP How to pass a file?

Post by requinix »

Post Reply