Re: can .inc run php script?
| From: | Shawn Blaylock | Date: | Mon, 29 Jan 2001 22:20:41 +0000 |
| Subject: | Re: can .inc run php script? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-37145@lists.php.net to get a copy of this message | ||
You have to set up the webserver to accept .inc files as php scripts.
The example you gave isn't actually running the function it's just
defining it.
If you include the .inc file in a .php file, it'll run whatever's in it
as if it were part of the php file.
If you directly call the .inc file from the browser without setting up
the webserver properly, it'll output the source of the inc file.
If you set up the webserver to use the php parser on inc files, it'll
work fine.
If you include the .inc file in a .php file, it'll work fine.
John LYC wrote:
>
> hi all,
>
> can .inc file run scripts...
>
> example...
>
> //config.inc
>
> function watever()
> {
> //do something
> $var = something;
> return $var;
> }
>
> thanks
>
> --
> 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
--
Shawn Blaylock, ClipperNet Software Engineer
shawnb@clipper.net
http://www.clipper.net/
Eugene OR 541-431-3360 x406
Toll Free 866-673-6260 x406