• Best way to include files in PHP

    Miranda65M Member

    Best way to include files in PHP

    Hello, I was just wondering which of the following ways is more proper one to include files in the same directory?

    
    

    OR

    
    
  • SapnaVishwas Member

    if the file.php is in the same directory you can do without the ‘.’

  • Amit Member

    also noted : the "./file" option is unix , if you are running an IIS with php enabled , use the relative path from windows notation.

    generally said : as long as php finds the file, it doesn’t matter “how” you include it.

    To test it, make a wee function like :

    
    
    
Viewing 2 reply threads
  • You must be logged in to reply to this topic.
en_USEnglish