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


Groups > comp.lang.php > #18291 > unrolled thread

include no work for some filenames

Started byMartin <please@see.Web.for.e-mail.INVALID>
First post2020-06-24 14:28 -0600
Last post2022-09-22 07:12 -0700
Articles 7 — 6 participants

Back to article view | Back to comp.lang.php


Contents

  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

#18291 — include no work for some filenames

FromMartin <please@see.Web.for.e-mail.INVALID>
Date2020-06-24 14:28 -0600
Subjectinclude no work for some filenames
Message-ID<rd0d1n$nsc$1@dont-email.me>
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/

[toc] | [next] | [standalone]


#18292

FromMartin <please@see.Web.for.e-mail.INVALID>
Date2020-06-24 14:55 -0600
Message-ID<rd0ek4$j70$1@dont-email.me>
In reply to#18291
Martin wrote:
> 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"; ?>
...
> The first two includes succeed while the last two fail
> with the warnings:
...

Brain fart.  I need to use something like:
<?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'; ?>

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

[toc] | [prev] | [next] | [standalone]


#18293

FromPaul Herber <paul@paulherber.co.uk>
Date2020-06-24 22:00 +0100
Message-ID<ajf7ff1j8lrpa2lt4gb7aafh2imqrhugvc@news.eternal-september.org>
In reply to#18291
On Wed, 24 Jun 2020 14:28:36 -0600, Martin <please@see.Web.for.e-mail.INVALID> wrote:

>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.

the start of two of your filenames contain \t and \f inside "xxx". Put the $localBase
outside the "xxx" and use  'xxx' instead.


-- 
Regards, Paul Herber
https://www.paulherber.co.uk/
      

[toc] | [prev] | [next] | [standalone]


#18295

From"J.O. Aho" <user@example.net>
Date2020-06-24 23:39 +0200
Message-ID<hlhvhdF67icU2@mid.individual.net>
In reply to#18291
On 24/06/2020 22.28, Martin wrote:
> 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"; ?>

You need to escape the backslash, \\ instead of \

I would recommend you to update your operating system, I don't care so 
much about your computer and data, but it will cause a lot of trouble 
for everyone else.

-- 

  //Aho

[toc] | [prev] | [next] | [standalone]


#18296

FromJerry Stuckle <jstucklex@attglobal.net>
Date2020-06-25 11:40 -0400
Message-ID<rd2ghg$43k$1@jstuckle.eternal-september.org>
In reply to#18295
On 6/24/2020 5:39 PM, J.O. Aho wrote:
> On 24/06/2020 22.28, Martin wrote:
>> 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"; ?>
> 
> You need to escape the backslash, \\ instead of \
> 
> I would recommend you to update your operating system, I don't care so 
> much about your computer and data, but it will cause a lot of trouble 
> for everyone else.
> 

Alternatively, a forward slash ('/') works in Windows, also.

Although I agree with your sentiment, some of us don't have a choice for 
other reasons. :)

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex@attglobal.net
==================

[toc] | [prev] | [next] | [standalone]


#19044

FromHärra Rabmo <he12091983@gmail.com>
Date2022-07-08 06:45 -0700
Message-ID<d4dec3e9-e190-49f8-baba-235b9c12225fn@googlegroups.com>
In reply to#18291
HEY !!!!!!!!!!!!!!!! WANT TO TALK WITH SOMEONE ???????????????????
CALL MY NUMBER THEN !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!



*******************************************************
*******************************************************
 ✆☎☏📱📞 : 372 53900660

Martin kirjutas Kolmapäev, 24. juuni 2020 kl 22:28:45 UTC+2:
> 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: ple...@see.Web.for.e-mail.INVALID 
> Web: http://members.tripod.com/martin_leese/

[toc] | [prev] | [next] | [standalone]


#19104

From"He, who travels time to time" <he1983912@aol.com>
Date2022-09-22 07:12 -0700
Message-ID<0a9f6ba3-eea9-45b7-9596-c60917575e93n@googlegroups.com>
In reply to#18291
Hey... Want to talk? Call me.... My telephone number >>>>

(+372) 56330687



Martin kirjutas Kolmapäev, 24. juuni 2020 kl 23:28:45 UTC+3:
> 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: ple...@see.Web.for.e-mail.INVALID 
> Web: http://members.tripod.com/martin_leese/

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.php


csiph-web