Re: component library
| From: | Rasmus Lerdorf | Date: | Mon, 13 Aug 2001 07:09:47 +0000 |
| Subject: | Re: component library | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62376@lists.php.net to get a copy of this message | ||
> as cold fusion (custom tags), can i made some component to reuse in all my
> script ?
<?custom_tag()?>
> is a function visible every where in PHP ?
Yes
> can i developp a script with a name, and call this script by an include
> function and passing parameters ?
You don't need to pass parameters since included files share the same
symbol table as the file they were included from. You simply define you
variable, then do the include and inside the include file you can access
the variable.
eg.
$a = 123;
include 'something.php';
Inside something.php you can then access $a
-Rasmus