Hi there!,
When you include information from an include file, PHP treats the text as
inline code if you use the include() function.
In other words, if you use code like this:
<?php
include 'file.php';
?>
Then any functions inside file.php will be available just as if you'd
copy/pasted them in.
If file.php contained:
function echoThis($this_text){
echo($this_text);
}
then you could type
<?php
include 'file.php';
echoThis("I am some text");
?>
and whatever echoThis() is coded to do will happen just as if the file
looked like this:
<?php
function echoThis($this_text){
echo($this_text);
}
echoThis("I am some text");
?>
For more information, see http://www.php.net/manual/en/function.include.php
HTH,
Dw
Sqlcoders.com Dynamic data driven web solutions
----- Original Message -----
From: "Rodrigo" <[EMAIL PROTECTED]>
To: "'Php Lista'" <[EMAIL PROTECTED]>
Sent: May 21 2002 08:48 PM
Subject: [PHP] Function
Hi guys I'm trying to use a function on na .inc file, how should I do?
How should I write the function and what should I write on the file so
that the function file is "Included" to be used on a function call on
the php file?
I appreciate any kind of sample code.
Thanx,
Rodrigo de Oliveira Costa
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php