Bluehost.com Web Hosting $6.95

prepend file to all scripts...

This is a discussion on prepend file to all scripts... within the PHP General forums, part of the PHP Programming Forums category; I thought I read that this was possible once, but I can't find anything to substantiate/refute it... Is ...


Go Back   Usenet Forums > PHP Programming Forums > PHP General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-24-2003
Jonathan Villa
 
Posts: n/a
Default prepend file to all scripts...

I thought I read that this was possible once, but I can't find anything
to substantiate/refute it...

Is it possible to prepend a configuration file to my pages?

For example,

I have a app.config.inc file which contains an application specific
include path as well as includes the classes my application needs.
Currently this file is in my web root, but I would like to place it
outside of my web root but still include it in all of my pages...

Is this possible?
Reply With Quote
  #2 (permalink)  
Old 10-24-2003
Ray
 
Posts: n/a
Default Re: [PHP] prepend file to all scripts...

snip from:
http://www.php.net/manual/en/configu...directives.php

auto_prepend_file string

Specifies the name of a file that is automatically parsed before
the main file. The file is included as if it was called with the
include() function, so include_path is used.

The special value none disables auto-prepending.

auto_append_file string

Specifies the name of a file that is automatically parsed after
the main file. The file is included as if it was called with the
include() function, so include_path is used.

The special value none disables auto-appending.

Note: If the script is terminated with exit(), auto-append will not
occur.

http://www.php.net/manual/en/configu...directives.php

On Friday 24 October 2003 15:00, Jonathan Villa wrote:
> I thought I read that this was possible once, but I can't find
> anything to substantiate/refute it...
>
> Is it possible to prepend a configuration file to my pages?
>
> For example,
>
> I have a app.config.inc file which contains an application specific
> include path as well as includes the classes my application needs.
> Currently this file is in my web root, but I would like to place it
> outside of my web root but still include it in all of my pages...
>
> Is this possible?

Reply With Quote
  #3 (permalink)  
Old 10-24-2003
Wouter Van Vliet
 
Posts: n/a
Default RE: [PHP] prepend file to all scripts...

Add:
php_value auto_prepend_file "/path/to/file"

To your .htaccess or VirutualHosts section.

You might also want to use auto_append_file

Wouter

-----Original Message-----
From: Jonathan Villa [mailto:jvilla@isdesigndev.com]
Sent: Friday 24 October 2003 22:00
To: php-general@lists.php.net
Subject: [php] prepend file to all scripts...

I thought I read that this was possible once, but I can't find anything to
substantiate/refute it...

Is it possible to prepend a configuration file to my pages?

For example,

I have a app.config.inc file which contains an application specific include
path as well as includes the classes my application needs.
Currently this file is in my web root, but I would like to place it outside
of my web root but still include it in all of my pages...

Is this possible?

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
Reply With Quote
  #4 (permalink)  
Old 10-24-2003
Jonathan Villa
 
Posts: n/a
Default RE: [PHP] prepend file to all scripts...

It looks like auto_prepend_file will do this for all of my apps...

I'll look into the .htaccess option

On Fri, 2003-10-24 at 15:07, Wouter van Vliet wrote:
> Add:
> php_value auto_prepend_file "/path/to/file"
>
> To your .htaccess or VirutualHosts section.
>
> You might also want to use auto_append_file
>
> Wouter
>
> -----Original Message-----
> From: Jonathan Villa [mailto:jvilla@isdesigndev.com]
> Sent: Friday 24 October 2003 22:00
> To: php-general@lists.php.net
> Subject: [php] prepend file to all scripts...
>
> I thought I read that this was possible once, but I can't find anything to
> substantiate/refute it...
>
> Is it possible to prepend a configuration file to my pages?
>
> For example,
>
> I have a app.config.inc file which contains an application specific include
> path as well as includes the classes my application needs.
> Currently this file is in my web root, but I would like to place it outside
> of my web root but still include it in all of my pages...
>
> Is this possible?
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
> http://www.php.net/unsub.php

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 02:23 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0