[thelist] PHP includes on Linux vs. Windows

David Bindel dbindel at austin.rr.com
Sat Nov 30 11:09:01 CST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I have recently "migrated" to a dual-boot system with Slackware Linux
and Windows 2000 Server.  Last night on the Linux partition I
finished configuring Apache with PHP.  When I moved the website that
I am hosting over to the Linux partitions, I kept getting errors
saying that it could not open the files included with PHP include()
statement.

On Windows, I had included them this way, and it worked perfectly for
all pages of the websites:

<?php include("/includes/included_file.php"); ?>

When I moved the website files over to Linux, all of my include()
statements were broken because PHP "could not find the file".  After
doing a search, I found that I could place a "." in front of the
first "/" to make it check in the current directory, but then I would
have to change everything to make it relative to the current
directory.

My question is this: is it possible to include files from the
website's root directory relatively (like I had previously done on
Windows)?

I'm really hoping it's a "yes".


Thanks,

David Bindel

-----BEGIN PGP SIGNATURE-----
Version: PGP 7.0.4

iQA/AwUBPejwr36TtTuKuQdTEQK2bQCeOgQtHqwEb1Ib9pT/4Q1UpGdCgxUAoIlC
xKE4zKeJzCj/vKpn8EKFhscA
=SInP
-----END PGP SIGNATURE-----

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus Database: 238 - Release Date: 11/25/2002




More information about the thelist mailing list