 |
|
 |
|
Next: Splitting Field
|
| Author |
Message |
External

Since: Apr 22, 2005 Posts: 5
|
(Msg. 1) Posted: Sun Dec 11, 2005 12:55 pm
Post subject: PHP include/require bug? Archived from groups: alt>php (more info?)
|
|
|
Why can't I include/require a file starting with the letter 't'?
<?php
require "C:\t.php";
?>
[11-Dec-2005 15:55:00] PHP Warning: main(C: .php) [<a
href='function.main'>function.main</a>]: failed to open stream: Invalid
argument in D:\WWW\test.php on line 2
[11-Dec-2005 15:55:00] PHP Fatal error: main() [<a
href='function.require'>function.require</a>]: Failed opening required 'C:
..php' (include_path='.;C:\php5\pear') in D:\WWW\test.php on line 2
I've PHP Version 5.0.4
Stefan
PS: With all other tested filenames starting with another letter than 't'
are working. >> Stay informed about: PHP include/require bug? |
|
| Back to top |
|
 |  |
External

Since: Sep 17, 2003 Posts: 170
|
(Msg. 2) Posted: Sun Dec 11, 2005 12:55 pm
Post subject: Re: PHP include/require bug? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Stefan Mueller wrote:
> Why can't I include/require a file starting with the letter 't'?
> <?php
> require "C:\t.php";
>>
>
You can, but because of the double quotes, the backslash is interpreted as
an escape character.
To fix this, you have the following options:
* Use single quotes:
require 'C:\t.php';
* Use forward slashes:
require "C:/t.php";
JW >> Stay informed about: PHP include/require bug? |
|
| Back to top |
|
 |  |
External

Since: Jul 28, 2005 Posts: 2
|
(Msg. 3) Posted: Sun Dec 11, 2005 12:55 pm
Post subject: Re: PHP include/require bug? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Apr 22, 2005 Posts: 5
|
(Msg. 4) Posted: Sun Dec 11, 2005 12:55 pm
Post subject: Re: PHP include/require bug? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
|
|
| Back to top |
|
 |  |
External

Since: Jan 06, 2006 Posts: 1
|
(Msg. 5) Posted: Fri Jan 06, 2006 1:55 am
Post subject: Re: PHP include/require bug? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Stefan Mueller escribió:
> Oh yea, of course!
> I was really very confused but now everything is clear.
>
> You are great. Many thanks for your explanation and your solutions
> Stefan
>
>
as far as you can, I suggest you should use relative path anyway. Just
in case you want to publish the site elsewhere after designing it on
your PC.
bye >> Stay informed about: PHP include/require bug? |
|
| Back to top |
|
 |  |
External

Since: Apr 22, 2005 Posts: 5
|
(Msg. 6) Posted: Fri Jan 06, 2006 4:55 am
Post subject: Re: PHP include/require bug? [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
> as far as you can, I suggest you should use relative path anyway. Just in
> case you want to publish the site elsewhere after designing it on your PC.
That's a good hint.
Many thanks
Stefan >> Stay informed about: PHP include/require bug? |
|
| Back to top |
|
 |  |
| Related Topics: | include within include, using a relatve path - Hi, I have noticed something in PHP's include mechanism that surprised me. If you include a script that itself contains an include command using a relative path, that path is interpreted from the position of the 'outermost' script, not that of the scrip...
require, require_once, etc. - I read on a website recently that using require_once, although it sounds like a nice idea, actually is processor expensive. But the guy who posted that didn't say what else is faster: * require * include * include_once Which is fastest?
php include - I like to change a site from frames to a site that uses php pages with include. But the site contains subfolders and in those subfolders are images. I want to make a page, say index.php that includes a page in the subfolder: <?php..
include statement - Has anyone ever experienced an issue with an include statement where the included file is processed, however, no further code is processed after the included content? I have used includes for quite a while, however, this is a new one for me. Any..
Cant get include to work... - Hi This may be easy to most of you, but as a newbiw; I'm struggling. I am bringing in an include into a php file, but cant run the commands within the include. As an example, Within my php page I write: {php}include("content/myinclude.php")... |
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
 |
|
|