Jump to content

urlencode issue (Maybe?)


tHud

Recommended Posts

Hi :)

I am using urlencode to create links to pages.

 

It all works well until I come up against 'TradeMark' or 'Registered' etc.

 

The snippet below works up to a point...

 


<?php

$pagename = urlencode("Test Device® CR Plus");

touch ("$pagename.htm");

echo "<a href=\"$pagename\">Test Device® CR Plus</a>";

?>

 

The point being, it creates a file called Test+Device%AE+CR+Plus.htm as you would expect.

 

However, when clicking on that link, I get a 404.

 

I checked in the browser window and in the FTP pane and the file is definitely there.

 

However, when clicking on Test+Device%AE+CR+Plus.htm in a browser file listing, this  Test+Device%25AE+CR+Plus.htm  is what I see in the browser navigation bar.

 

Any thoughts on how I can get around this?

 

Thanks.

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.