Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include File Confusion

Status
Not open for further replies.

Michael42

Programmer
Joined
Oct 8, 2001
Messages
1,454
Location
US
Hello,

In ASP to use my include files off the document root I would use the MAPPATH command.

In PHP however I am finding using what seems to be the equivilent, $_SERVER["DOCUMENT_ROOT"], works fine on UNIX\LINIX servers but when used on Windows server running apache\php UNIX client browsers cannot deal with it.

Perhaps it is because the path translates to "c:/program files/apache group/apache/htdocs"??? ...to Windows-ish? I tried PATH_TRANSLATED and the like...still no go. I also tried hard coding ( I know it should not matter to the client when accessing a web server that uses this $_SERVER["DOCUMENT_ROOT"]). It does not make sense. (-:

Any suggestions on running apache\php on a windows server with UNIX\LINUX client browsers?

Thanks all,

Michael42
 
well the MAPPATH equivalent in php is getcwd()

Known is handfull, Unknown is worldfull
 
...when used on Windows server running apache\php UNIX client browsers cannot deal with it...

PHP is interpreted by a back end of the web server. The clients - no matter what OS they are on - have no bearing on the execution of PHP at all. The reasons for the difficulty lie elswhere, namely server side.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top