What tu use to call a php from php

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

    What tu use to call a php from php

    Hi,
    I've a php file file1.php that is called from an html form using the post
    method.
    I need to call it another time from a php file file file1.php,
    I found 3 ways : include, require, and header
    What is the most appropriate in my case? thanks


  • Tim Van Wassenhove

    #2
    Re: What tu use to call a php from php

    On 2004-01-14, toufik toufik <toufiki@sympat ico.ca> wrote:[color=blue]
    > Hi,
    > I've a php file file1.php that is called from an html form using the post
    > method.
    > I need to call it another time from a php file file file1.php,
    > I found 3 ways : include, require, and header
    > What is the most appropriate in my case? thanks[/color]

    This answer can be found at http://www.php.net/manual ;)

    --

    Comment

    • CountScubula

      #3
      Re: What tu use to call a php from php

      "toufik toufik" <toufiki@sympat ico.ca> wrote in message
      news:r7dNb.1367 $c1.238756@news 20.bellglobal.c om...[color=blue]
      > Hi,
      > I've a php file file1.php that is called from an html form using the post
      > method.
      > I need to call it another time from a php file file file1.php,
      > I found 3 ways : include, require, and header
      > What is the most appropriate in my case? thanks
      >
      >[/color]


      as far as header, you lost me, but thats ok.

      the other two include and require, this assumes you need the ability in the
      same script file1.php, without leaving it.

      require - first loads the second script and treats it as if it were at the
      top of your calling script. This is generaly used for config info, functions
      etc...

      now

      include - treates the included file as if it were part of your original
      script right were you place it in the source. (almost like an external
      funciton)

      --
      Mike Bradley
      http://www.gzentools.com -- free online php tools


      Comment

      • Chung Leong

        #4
        Re: What tu use to call a php from php

        Wait. So file1.php needs to call itself again? The most appropriate way is
        to write a loop doing whatever twice.

        Uzytkownik "toufik toufik" <toufiki@sympat ico.ca> napisal w wiadomosci
        news:r7dNb.1367 $c1.238756@news 20.bellglobal.c om...[color=blue]
        > Hi,
        > I've a php file file1.php that is called from an html form using the post
        > method.
        > I need to call it another time from a php file file file1.php,
        > I found 3 ways : include, require, and header
        > What is the most appropriate in my case? thanks
        >
        >[/color]


        Comment

        Working...