Global.asa is to ASP... ? is to PHP?

?

-

Hi,

Currently I have a file which I include in every php file that requires
a database connection.

Instead of putting 'include("db_connection.inc")' inside those files, is
there a way to place it in a global environment?

If I were to use ASP, the solution is to put the statement inside the
global.asa file.

What is the solution for php? Thank you in advance.
 
H

Hive

What is the solution for php? Thank you in advance.

There is no PHP equivalent for this feature.
BTW - do not post PHP questions to Java group,
You'd be better using comp.lang.php.

H.
 
?

-

Hive said:
There is no PHP equivalent for this feature.
BTW - do not post PHP questions to Java group,
You'd be better using comp.lang.php.

H.

Oops. My bad. Didn't realise it until you mentioned it.
 
S

Steve Sobol

- said:
Hi,

Currently I have a file which I include in every php file that requires
a database connection.

Instead of putting 'include("db_connection.inc")' inside those files, is
there a way to place it in a global environment?

If I were to use ASP, the solution is to put the statement inside the
global.asa file.

What is the solution for php? Thank you in advance.

You can use php_value inside .htaccess to automatically include the file(s) you
need in every php script. Contact me off-group for more details as this is not
a PHP group that you've posted to.

--
JustThe.net - Apple Valley, CA - http://JustThe.net/ - 888.480.4NET (4638)
Steven J. Sobol, Geek In Charge / (e-mail address removed) / PGP: 0xE3AE35ED

"In case anyone was wondering, that big glowing globe above the Victor
Valley is the sun." -Victorville _Daily Press_ on the unusually large
amount of rain the Southland has gotten this winter (January 12th, 2005)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top