Re: include and require
| From: | scottrus at ipass dot net | Date: | Sun, 02 Jul 2000 04:17:28 +0000 |
| Subject: | Re: include and require | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4354@lists.php.net to get a copy of this message | ||
Eris -
Creat a file called test.inc and add the following lines:
<?
echo "<P>This is text from my include file. The date is ".date();
?>
Now create a second file in the same directory called test.php. Add the
lines :
<HTML>
<HEAD><TITLE>Test Include</TITLE></HEAD>
<BODY>
<H1>My Test Include File</H2>
<?include("test.inc");?>
</BODY>
</HTML>
You should see the contents of 'test.inc' have been included into the file
'test.php' when it was parsed.
-- Scott
On Sun, Jul 02, 2000 at 07:11:13PM +0700, Eris Ristemena wrote:
> hi all,
> i read in the manual many times but still i cannt figure out when we use
> include() and require() ?
> any suggestion will be well appreciate.
>
> - eris
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
Scott