Image upload - Return URL
Posted
by
Qmal
on Stack Overflow
See other posts from Stack Overflow
or by Qmal
Published on 2011-01-11T15:42:26Z
Indexed on
2011/01/11
15:53 UTC
Read the original article
Hit count: 133
php
|file-upload
Hello I build a script that does image uploading and resizing and it all works well, but how can I get the URL from image afterwards? I don't want my Image Source in HTML be like "../img/cat/1.png/" I want it to be like "http://MyIP/img/cat/1.png" I understand that I can just make a variable like $myHost = "http://blabla.com"; and add strip the ".." at the beginning but then it's not so good if I want to use it on other site because I need to replace this all the time. Maybe there is any other way?
© Stack Overflow or respective owner