/ = %2f??

They have: 164 posts

Joined: Nov 2001

i tried to echo '/' but the output becomes '%2F'. wat should i put in order to get my '/'?

They have: 601 posts

Joined: Nov 2001

I'm assuming you're using PHP here? Maybe the following URLs will help you:

http://www.php.net/manual/en/function.echo.php
http://www.zend.com/zend/tut/using-strings.php#quoted

I'm no PHP-expert, but I believe you need to either escape the entire string or just the single character.

- wil

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Where did you print that? That looks like it's been through URLEncode().

They have: 164 posts

Joined: Nov 2001

this is my code:

<?php
switch ($subcat)
    {
        case
'Net Essentials':
           
$location = \"abc/netessentials\";
            break;
        case 'NT Workstation':
           
$location = \"ntworkstation\";
            break;
        default:
           
$location = \"ntserver\";
            break;
}


header(\"Location:<a href=\"http://www.certifyexpress.com/\" target=\"_blank\"><a href=\"http://www.certifyexpress.com/\" class=\"bb-url\">http://www.certifyexpress.com/</a></a>\".urlencode(
$location).\"/index.php\");
?>

when i try to add '/' in my location, $location = "abc/netessentials";

the url will become like this:
http://www.certifyexpress.com/abc%2...tials/index.php which lead me to page not found.

pls help.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

take out urlencode(), you don't need it

They have: 164 posts

Joined: Nov 2001

some of then got space, for eg. abc def...if i dun put the urlencode, it will tend to ignore the word after the space..

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.