Remove base_url() from whole URL

Hey guys,

I have an onclick copy ( i display images and user can click on them and the URL of the image written into a textfield) .
The problem is : i just want siteurl not the full url.
image url:
this url get copied into my textfield and saved like this into my DB.
Now i want only this part: /images/asd.jpg get saved to my DB.
Is there any way to substract the base_url() from the full url?

this is my js function:

function clicked(address) {
document.getElementById('copy_img').value = address.src;

and i call it via:


best regards

Oh was easy just thought about too hard ways:

for everyone :

$image = uri_string($this->input->post('image'));

Uri_string. CI ftw , userguide ftw Smile
first read than post .

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.