require

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom

    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


  • Manitoba98

    #2
    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@fakeemaila ddresss.com> wrote in message
    news:Rgxec.6771 4$Id.14636@news-binary.blueyond er.co.uk...[color=blue]
    > 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[/color]
    stuff.[color=blue]
    >
    > Any idea how i could this ?
    >
    > thanks in advance
    >
    >[/color]


    Comment

    • Pedro Graca

      #3
      Re: require

      ["Followup-To:" header set to comp.lang.php.]
      Tom wrote:[color=blue]
      > 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 ?[/color]

      1. start output buffering
      2. include (or require) the file
      3. stop buffering and disregard the data

      Links:

      Clean (erase) the contents of the active output buffer and turn it off


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

      Comment

      Working...