Re: [PHP] can .inc run php script?

2001-01-29 Thread Shawn Blaylock

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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Shawn Blaylock, ClipperNet Software Engineer
[EMAIL PROTECTED]
http://www.clipper.net/
Eugene OR  541-431-3360 x406
Toll Free  866-673-6260 x406

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] can .inc run php script?

2001-01-29 Thread Brian V Bonini

Well if your using .inc then your probably including
this into a php file via include "config.inc";
in which case it will become part of a php file so
yes it will be parsed.

If your trying to run it as a standalone then that
will depend on your web server config and which
files you've told it to parse as php files.

-Brian
*

 -Original Message-
 From: John LYC [mailto:[EMAIL PROTECTED]]
 Sent: Sunday, January 28, 2001 6:31 AM
 To: PHP List
 Subject: [PHP] can .inc run php script?
 
 
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] can .inc run php script?

2001-01-29 Thread John LYC

THANKS EVERYONE!!!...


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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] can .inc run php script?

2001-01-29 Thread Maxim Maletsky

Yup,

you can even run .maxim or .john if you add them into apache's httpd.conf,
or without adding anything you can just include() any possible kind of file
into .php file and it will be processed just as a .php file.

Cheers,
Maxim Maletsky

-Original Message-
From: John LYC [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 28, 2001 8:31 PM
To: PHP List
Subject: [PHP] can .inc run php script?


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]