Web Hosting Talk







View Full Version : very weird...


brcolow
11-03-2002, 07:08 PM
Hey, alright I have this line of code

<?php include ("d:\www\www.flashstand.com\tablebanner.html"); ?>

yes, im sure the slashes and the path are right because i include alot on my pages.
I ran a test page with that line of code to test it and for some REALLY weird reason it gives me this error

Warning: Failed opening 'd:\www\www.flashstand.com ablebanner.html' for inclusion (include_path='.;c:\php4\pear') in D:\www\www.flashstand.com\reviews\test2.php on line 1

if anything, it should be....

Warning: Failed opening 'd:\www\www.flashstand.com\tablebanner.html' for inclusion (include_path='.;c:\php4\pear') in D:\www\www.flashstand.com\reviews\test2.php on line 1
So whats up? why is it giving me this werid error??
THanks,
Mike

MarkIL
11-03-2002, 07:10 PM
Because "\t" is an escape character -- tab.
To actually use the literal string "\t", specify "\\t" instead of "\t".

jtrovato
11-04-2002, 08:34 AM
good eye. I wouldn't have notice the \ escape char...

MarkIL
11-04-2002, 08:43 AM
Originally posted by jtrovato
good eye. I wouldn't have notice the \ escape char...

It's just experience ;)
I always check for that kinda stuff when I encounter odd errors. 99% of the time, it's a stray escape character. In the remaining 1% -- it's a different problem, such as a disk/fs driver/OS problem or a solar flare, or a UFO landing etc.