Welcome Guest, Not a member yet? Register   Sign In
problem uri->segment(4)
#1

[eluser]aataqwa[/eluser]
I have problem
Code:
in my url = http://tes.biz/index.php/networks/view/XX642X#4

echo $this->uri->segment(4);

output XX642X

Quote: How to get like this: XX642X#4


Thx Regard.
#2

[eluser]hostcord[/eluser]
The pound sign is used to reference an anchor tag to jump to. You will have to replace it with something else or else encode it using urlencode ( # ) and then decode it with urldecode.
#3

[eluser]aataqwa[/eluser]
Thx, hostcord

but I not understand whal do you mean..?

pleace give me example code it... thx
#4

[eluser]hostcord[/eluser]
The pound sign is used to reference an anchor on the page to jump to. http://freepages.computers.rootsweb.ance...nchors.htm is an article about it. It will not be accessible to your php script unless it is encoded and would thus render the default action (to jump to the anchor link) void.

What is the purpose of having it in your php script? If it's use is to jump to a link anchor
then you should keep it otherwise use a different character for the url formatting.

Hope that helps.
#5

[eluser]Aken[/eluser]
Named anchors are HTML that look like this
Code:
<a name="text"></a>

If a URL has a # sign, it's telling the browser to look for a named anchor of the same value. IE: http://www.example.com/homepage#text will cause the browser to jump down to wherever the above anchor code is inside the HTML page.

Basically, you shouldn't use # symbols in your URLs as a dynamic variable.




Theme © iAndrew 2016 - Forum software by © MyBB