"include foo.php" doesn't work

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
guarriman
Forum Commoner
Posts: 44
Joined: Thu Nov 03, 2005 4:11 am

"include foo.php" doesn't work

Post by guarriman »

Hi.

With 4.4.2 + Apache 2.0 on Linux, I've got these PHP lines
within '/var/www/html/vhosts/foo.com/httpdocs/index.php':
-------
print "Here 1";
include ('/var/www/html/vhosts/foo.com/httpdocs/foo.php');
print "Here 2";
-------

I get "Here 1" message, but not "Here 2", and
'/var/www/html/vhosts/foo.com/httpdocs/foo.php' does exist.

I chowned '/var/www/html/vhosts/foo.com/' for root.root, and
chmoded with 777 permissions.

What am I doing wrong? Thank you very much
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

if in doubt.....

Code: Select all

<?php
// at the top of your page
error_reporting (E_ALL);
?>
remember *nix is also case-sensitive
Post Reply