Results 1 to 4 of 4

Thread: different between include and include_once

  1. #1
    Junior Member
    Join Date
    Jul 2008
    Answers
    1

    different between include and include_once

    hi friends ,


    Today i am join the this group ... my name is venkat i am join new php company . i have one doubt pls clarified this doubt


    Different between include and include_once ......


  2. #2
    Junior Member
    Join Date
    Jul 2008
    Answers
    1

    Re: different between include and include_once

    include_once in much secure than include. but both have the same results.....Thanks


  3. #3
    Junior Member
    Join Date
    Mar 2009
    Answers
    9

    Re: different between include and include_once

    when ever a file find include funtion it trys to include the whole code of the included file in the execting file. so if you use same file include more than one, if the file contains function you will get function redeclre error at the second instance.

    other wise, if you use include_once it will check whthere this file is already inclulded or not and if not then only in replaces the include file code.


  4. #4
    Junior Member
    Join Date
    Jul 2008
    Answers
    8

    Re: different between include and include_once

    Yes. I am agreeing with venkat answer.

    Because by using include function, we add the same files several times. It will store multiple files with a same name. And is reduce the performance.

    If we use include_once function, the file will add only once. It avoid multi storages of a single file. Raises the performance for big applicatins.


    Regards,
    RK


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact