Ask a Question related to PHP Development, Design and Development.

  1. #1

    Default require

    hi i want to require or include a file in my php script.

    the file i want to include contains some variables and some normal html.

    i want to get the values of the variable without displaying the html stuff.

    Any idea how i could this ?

    thanks in advance


    Tom Guest

  2. Similar Questions and Discussions

    1. Use and Require
      Dear Perl Gurus, What is the difference between Use and Require. Thanks, Malliks
    2. #25782 [Opn->Bgs]: require( 'require.php' ) crashing Apache 1.3.28
      ID: 25782 Updated by: sniper@php.net Reported By: akinder at technology-x dot com -Status: Open +Status: ...
    3. #25782 [Fbk->Opn]: require( 'require.php' ) crashing Apache 1.3.28
      ID: 25782 User updated by: akinder at technology-x dot com Reported By: akinder at technology-x dot com -Status: ...
    4. #25782 [Opn->Fbk]: require( 'require.php' ) crashing Apache 1.3.28
      ID: 25782 Updated by: sniper@php.net Reported By: akinder at technology-x dot com -Status: Open +Status: ...
    5. #25782 [NEW]: require( 'require.php' ) crashing Apache 1.3.28
      From: akinder at technology-x dot com Operating system: Linux RedHat 9 PHP version: 5.0.0b1 (beta1) PHP Bug Type: Apache...
  3. #2

    Default Re: require

    Perhaps you could put your variables in a different file, and have both of
    your present files require or include it? Other than that, I have no idea...

    Manitoba98XP
    "Tom" <tom@fakeemailaddresss.com> wrote in message
    news:Rgxec.67714$Id.14636@news-binary.blueyonder.co.uk...
    > hi i want to require or include a file in my php script.
    >
    > the file i want to include contains some variables and some normal html.
    >
    > i want to get the values of the variable without displaying the html
    stuff.
    >
    > Any idea how i could this ?
    >
    > thanks in advance
    >
    >

    Manitoba98 Guest

  4. #3

    Default Re: require

    ["Followup-To:" header set to comp.lang.php.]
    Tom wrote:
    > hi i want to require or include a file in my php script.
    >
    > the file i want to include contains some variables and some normal html.
    >
    > i want to get the values of the variable without displaying the html stuff.
    >
    > Any idea how i could this ?
    1. start output buffering
    2. include (or require) the file
    3. stop buffering and disregard the data

    Links:
    [url]http://www.php.net/ob_start[/url]
    [url]http://www.php.net/ob_end_clean[/url]

    --
    USENET would be a better place if everybody read: : mail address :
    [url]http://www.catb.org/~esr/faqs/smart-questions.html[/url] : is valid for :
    [url]http://www.netmeister.org/news/learn2quote2.html[/url] : "text/plain" :
    [url]http://www.expita.com/nomime.html[/url] : to 10K bytes :
    Pedro Graca Guest

Posting Permissions

  • You may not post new threads
  • You may 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