Online Shopping : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to
Did You Find This Entry Useful?

70 of 118 people (59%) answered Yes
Recently 5 of 10 people (50%) answered Yes


Can the PHP include command be used with a virtual path?

Mar 7th, 2009 12:34
marshal prince, healthy man, dman, Articles Way, Onno Benschop, Julian Rockey,

You can use: include("../../myPathSomewhere/myFile.php"), this also 
works for require().
You can also use:
$myIncludePath = "/bob/somewhere/" ;
include ($myIncludePath."databaseRoutines.php") ;
i hope that helps.