[thelist] stupid php include question

Maximillian Schwanekamp anaxamaxan at neptunewebworks.com
Wed Feb 25 20:21:00 CST 2004


Just use $_SERVER['DOCUMENT_ROOT']; in your include:

<?php
include($_SERVER['DOCUMENT_ROOT'].'/path/to/file.htm');
?>

Maximillian Von Schwanekamp
Websites for Profitable Microbusiness
NeptuneWebworks.com
voice: 541-302-1438
fax: 208-730-6504


-----Original Message-----
From: Diane Soini [mailto:dianesoini at earthlink.net]
Sent: Wednesday, February 25, 2004 6:00 PM
To: thelist at lists.evolt.org
Subject: [thelist] stupid php include question


I'm sorry. I'm a php novice. I checked php.net but the answer was not 
apparent to me there.

When you use SSI you can include a file using / as the root level. 
Doesn't seem to work for php. How the heck do you do the same? Example 
SSI:
<!--#include virtual="/path/to/file.html" -->

Sorry.
Diane

***
Don't be afraid to try something new. An amateur built the ark. 
Professionals built the Titanic. -unknown

-- 
* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 






More information about the thelist mailing list