Professional Web Applications Themes

prepend file to all scripts... - PHP Development

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?...

  1. #1

    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?
    Jonathan Guest

  2. #2

    Default Re: [PHP] prepend file to all scripts...

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

    auto_prepend_file string

    Specifies the name of a file that is automatically pd 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 pd 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/configuration.directives.php

    On Friday 24 October 2003 15:00, Jonathan Villa wrote: 
    Ray Guest

  3. #3

    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:com]
    Sent: Friday 24 October 2003 22:00
    To: 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
    Wouter Guest

  4. #4

    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: 
    Jonathan Guest

Similar Threads

  1. CS: Scripts do not appear in Scripts menu
    By jlw99@adobeforums.com in forum Adobe Illustrator Macintosh
    Replies: 3
    Last Post: May 18th, 04:49 PM
  2. [PHP-DEV] [PATCH] Prepend and append strings for zend_highlight
    By Evan Nemerson in forum PHP Development
    Replies: 0
    Last Post: October 29th, 07:00 PM
  3. Replies: 0
    Last Post: July 30th, 03:20 AM
  4. I can't find the file /usr/src/linux/scripts/modpost but I need it
    By ramzez@netcourrier.com in forum Debian
    Replies: 4
    Last Post: July 30th, 02:30 AM
  5. HTML file generation from PHP scripts
    By Emanuele D'Arrigo in forum PHP Development
    Replies: 6
    Last Post: July 18th, 09:34 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139