Welcome Guest, Not a member yet? Register   Sign In
[Solved] how to hide a part of url?
#6

[eluser]pickupman[/eluser]
[quote author="Mr-H" date="1274123387"]thank you pickupman but i have already create a thumb; and i dont wana dispaly the id in the url but a friendly url like this: http://localhost/link/my_pic[/quote]

Like I mentioned, the code is all right there just change it to suit your needs. Rather than retrieving a image id, alter the code to lookup up the image name. Change the name of the controller, or use a route to do it for you.

Code:
$route['link/(:any)'] = 'imaging/index/$1';

Use whatever way you want to get the filename from the DB, and use the part you really need is:

Code:
header('Content-type: image/jpeg');
echo file_get_contents($full_path_to_filename);


Messages In This Thread
[Solved] how to hide a part of url? - by El Forum - 05-16-2010, 01:22 PM
[Solved] how to hide a part of url? - by El Forum - 05-16-2010, 01:52 PM
[Solved] how to hide a part of url? - by El Forum - 05-16-2010, 02:30 PM
[Solved] how to hide a part of url? - by El Forum - 05-16-2010, 06:54 PM
[Solved] how to hide a part of url? - by El Forum - 05-17-2010, 08:09 AM
[Solved] how to hide a part of url? - by El Forum - 05-17-2010, 08:40 AM
[Solved] how to hide a part of url? - by El Forum - 05-22-2010, 05:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB