chronister Posted January 16, 2008 Share Posted January 16, 2008 Could someone please tell me what that is and why it is showing up in my page? the page it is showing up on lives in /dir/page_with_error.php I am including a file that lives in /includefile.php with this code.. <?php $array = explode('/', $_SERVER['DOCUMENT_ROOT']); for($x=1; $x < (count($array) - 1 ) ; $x++){$serverRoot.= '/'.$array[$x];} include($serverRoot.'/connect.php'); ?> Anyone got an idea?? Thanks, Nate Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/ Share on other sites More sharing options...
revraz Posted January 16, 2008 Share Posted January 16, 2008 Because your editor put it there. Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-440993 Share on other sites More sharing options...
kts Posted January 16, 2008 Share Posted January 16, 2008 This may happen if you copy and paste text from certain programs/sites. The characters look invisible to you, but they end up showing on page. Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441008 Share on other sites More sharing options...
chronister Posted January 16, 2008 Author Share Posted January 16, 2008 I use dreamweaver in code view, and I did copy and paste, but I looked and there is no extra code or even white space. I copied and pasted from another php file. So I am baffled. Nate Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441022 Share on other sites More sharing options...
adam291086 Posted January 16, 2008 Share Posted January 16, 2008 when you switch deisgn mode in dreamweaver does it display. Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441025 Share on other sites More sharing options...
revraz Posted January 16, 2008 Share Posted January 16, 2008 Dreamweaver is known for this. May have to search on why and how to stop it or just use notepad to remove it. Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441032 Share on other sites More sharing options...
trq Posted January 16, 2008 Share Posted January 16, 2008 What exactly is the point of the code posted anyway? Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441034 Share on other sites More sharing options...
chronister Posted January 16, 2008 Author Share Posted January 16, 2008 What exactly is the point of the code posted anyway? I have a db class that handles all db communications. I want to use this with all the sites that reside on the server . I placed the file on the root of my webserver, each site lives in a dir named as the site. I use the code I posted to include this file. Since it lives in a directory above the site, I did not want to hard code the path, so I use the explode to create an array with all the pieces of the path.. e.g. the path come out something like /kunden/pages/32432432432432/htdocs/mysite.com then I basically replace the last /XXXX.XXX with /connect.php and my connection class is included from outside the site root. or just use notepad to remove it. It does not show in the code at all. Not with notepad or anything. Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441081 Share on other sites More sharing options...
PFMaBiSmAd Posted January 16, 2008 Share Posted January 16, 2008 The characters are the BOM http://en.wikipedia.org/wiki/Byte_Order_Mark when a file gets saved in UTF-8 formatting. Save your file as an ANSI/ASCII file. Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441090 Share on other sites More sharing options...
chronister Posted January 16, 2008 Author Share Posted January 16, 2008 I hate to sound stupid here, but how do I save in a specific encoding? Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441095 Share on other sites More sharing options...
chronister Posted January 16, 2008 Author Share Posted January 16, 2008 nevermind... opened in notepad, and lo and behold an encoding option... hehehee thanks PFMaBiSmAd ... that solved it Thanks everyone for the help here. Nate Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441097 Share on other sites More sharing options...
revraz Posted January 16, 2008 Share Posted January 16, 2008 Would think there would be a option in your editor too. Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441098 Share on other sites More sharing options...
trq Posted January 16, 2008 Share Posted January 16, 2008 You could simply use.... <?php $serverRoot = dirname($_SERVER['DOCUMENT_ROOT']) . '../'; include($serverRoot . '/connect.php'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441100 Share on other sites More sharing options...
chronister Posted January 17, 2008 Author Share Posted January 17, 2008 You could simply use.... <?php $serverRoot = dirname($_SERVER['DOCUMENT_ROOT']) . '../'; include($serverRoot . '/connect.php'); ?> Gives me the following error Warning:include(/11/d207413455/htdocs..//connect.php) failed to open stream: No such file or directory in Quote Link to comment https://forums.phpfreaks.com/topic/86318-solved-what-the-heck-is-this-%C3%AF%C2%BB%C2%BF/#findComment-441487 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.