Convert Absolute path to URL in PHP?

CyberWoolf

New member
Hi..

I have a script that lists images in a directory. However, there is no image preview. I wanted to add an image preview next to check marks but I can only get the absolute path of where the image is located.

Is there a way to add a variable/function to convert the absolute path to a url?

Ex.
<input type="checkbox"><img src="'.$abpath.$imgname.'" width="100" ">
I didn't want to just spew a ton of code so I made it a bit smaller to see if anyone would look :-)
Raina, worked great!! I really appreciate the help. I know bits and pieces of php and can edit it really well just not create new things :-)
 
Back
Top