IE Mac putting in strange characters

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
MtnBiker
Forum Newbie
Posts: 2
Joined: Mon Nov 03, 2003 4:56 pm
Location: California

IE Mac putting in strange characters

Post by MtnBiker »

The following is the HTML

Code: Select all

<a href="<?php readfile ("includes/phpbbPath.inc"); ?>viewforum.php?f=5" title="to the For Sale section of the Discussion Groups">For Sale and Wanted to Buy</a>
includes/phpbbPath.inc contains only:

Code: Select all

phpBB2/
no spaces before or after the text

and here is what IE Mac OS X shows as the URL

Code: Select all

http://www.sbmbc.com/ÔªøphpBB2/viewforum.php?f=5
Safari and Mozilla see it correctly (without the Ôªø).

How can I avoid this? This is not the only place I get extra characters with PHP, but this breaks the URL, the others just look strange and confuse people.

Thanks for any suggestions.
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Try this....

Code: Select all

<a href="<?php require("includes/phpbbPath.inc"); ?>viewforum.php?f=5" title="to the For Sale section of the Discussion Groups">For Sale and Wanted to Buy</a>

If you use readfile() PHP will load it as Binary not as plain/text.
MtnBiker
Forum Newbie
Posts: 2
Joined: Mon Nov 03, 2003 4:56 pm
Location: California

Post by MtnBiker »

Gen-ik wrote:Try this....

Code: Select all

<a href="<?php require("includes/phpbbPath.inc"); ?>viewforum.php?f=5" title="to the For Sale section of the Discussion Groups">For Sale and Wanted to Buy</a>

If you use readfile() PHP will load it as Binary not as plain/text.
Doesn't make any difference. Thank you for trying.
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Well why don't you just setup a variable and use that instead. It will be quicker than having to include external files all the time.

Code: Select all

<?
$phpbbPath = "phpBB2/";
?>

<a href="<?php echo $phpbbPath; ?>viewforum.php?f=5" title="to the For Sale section of the Discussion Groups">For Sale and Wanted to Buy</a>
Or you can do it this way...

PHPBBPATH.INC

Code: Select all

<?php
$phpbbPath = "phpBB2/";
?>
PHP PAGE

Code: Select all

<?php
include("includes/phpbbPath.inc");
?>

<a href="<?php echo $phpbbPath; ?>viewforum.php?f=5" title="to the For Sale section of the Discussion Groups">For Sale and Wanted to Buy</a>
Post Reply