Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => Images

image coding

images php coding issues or problems here.

Moderators: macek, egami, gesf

image coding

Postby mdehghani » Sat May 07, 2011 4:06 am

hi everyone.
I have a website with such a structure that there is a folder in the root and there is a .php in the folder which wants to show an image in the same folder. so the image and the webpage are like follows.
root>folder>webpage.php
root>folder>logo.gif

when I link to the image in the page I use this coding and runs fine on my hard drive:

src="logo.gif"

but when I upload it to my site it doesnt show up unless I use this coding:
src="/folder/logo.gif"

isn't there a way I could omit the total path and merely use the first example. I use 000webhost. please help
mdehghani
New php-forum User
New php-forum User
 
Posts: 2
Joined: Sun May 01, 2011 8:29 am

Re: image coding

Postby annyphp » Tue May 10, 2011 5:50 pm

search and free download PHP image gallery script from PHPKode.
Find the image script you want.
Hopefully can help you!
Kind Regards!
annyphp
New php-forum User
New php-forum User
 
Posts: 76
Joined: Sun Nov 28, 2010 6:33 pm

Re: image coding

Postby prbhat08 » Thu May 12, 2011 12:22 am

use http path for your image

for localhost it should be like this: src='http://localhost/yourproject/imagefolder/logo.gif"

for the webupload it should be like this: src='http://host.com/yourproject.com/imagefolder/logo.gif"


or directly u can use

src='http://<?=$_SERVER['HTTP_HOST']?>/yourproject/imagefolder/logo.gif"
prbhat08
New php-forum User
New php-forum User
 
Posts: 5
Joined: Thu Apr 28, 2011 8:02 pm


Return to PHP coding => Images

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron