Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #18291

include no work for some filenames

From Martin <please@see.Web.for.e-mail.INVALID>
Newsgroups comp.lang.php
Subject include no work for some filenames
Date 2020-06-24 14:28 -0600
Organization A noiseless patient Spider
Message-ID <rd0d1n$nsc$1@dont-email.me> (permalink)

Show all headers | View raw


OK, this one is driving me nuts.

I have a PHP file called "muck.php" containing the following:
<?php
     $localBase = 'C:\Documents and Settings\name\My Documents\Web Pages';
     include "$localBase\PHP\head.php";
?>
<?php include "$localBase\PHP\boot.php"; ?>
<?php include "$localBase\PHP\foot.php"; ?>
<?php include "$localBase\PHP\tail.php"; ?>

All of the four include files exist and are identical
(apart from the filenames) containing:
<?php
// This PHP file does very little.
?>

The first two includes succeed while the last two fail
with the warnings:
Warning: include(C:\Documents and Settings\name\My Documents\Web 
Pages\PHPoot.php): failed to open stream: Invalid argument in 
C:\Documents and Settings\name\My Documents\Web Pages\muck.php on line 6

Warning: include(): Failed opening 'C:\Documents and Settings\name\My 
Documents\Web Pages\PHPoot.php' for inclusion 
(include_path='.;C:\php\pear') in C:\Documents and Settings\name\My 
Documents\Web Pages\muck.php on line 6

Warning: include(C:\Documents and Settings\name\My Documents\Web 
Pages\PHP	ail.php): failed to open stream: Invalid argument in 
C:\Documents and Settings\name\My Documents\Web Pages\muck.php on line 7

Warning: include(): Failed opening 'C:\Documents and Settings\name\My 
Documents\Web Pages\PHP	ail.php' for inclusion 
(include_path='.;C:\php\pear') in C:\Documents and Settings\name\My 
Documents\Web Pages\muck.php on line 7

I am using PHP as a static file generator, and am using the command:
php -n -f "muck.php" > "muck.html"

This is using PHP 5.4.9 under Windows XP.

The problem is obviously the filenames, but why?  What is going on?
Many thanks for any help you can give.

-- 
Regards,
Martin Leese
E-mail: please@see.Web.for.e-mail.INVALID
Web: http://members.tripod.com/martin_leese/

Back to comp.lang.php | Previous | NextNext in thread | Find similar | Unroll thread


Thread

include no work for some filenames Martin <please@see.Web.for.e-mail.INVALID> - 2020-06-24 14:28 -0600
  Re: include no work for some filenames Martin <please@see.Web.for.e-mail.INVALID> - 2020-06-24 14:55 -0600
  Re: include no work for some filenames Paul Herber <paul@paulherber.co.uk> - 2020-06-24 22:00 +0100
  Re: include no work for some filenames "J.O. Aho" <user@example.net> - 2020-06-24 23:39 +0200
    Re: include no work for some filenames Jerry Stuckle <jstucklex@attglobal.net> - 2020-06-25 11:40 -0400
  Re: include no work for some filenames Härra Rabmo <he12091983@gmail.com> - 2022-07-08 06:45 -0700
  Re: include no work for some filenames "He, who travels time to time" <he1983912@aol.com> - 2022-09-22 07:12 -0700

csiph-web