|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
How to display image in PHP Page Looking for code for displaying image in PHP page. I have tried but not working. Thanks in Advance. |
#2
| |||
| |||
Re: How to display image in PHP Page If you have given a Image path saved in the database then try this code. Code: // escape from PHP ... ?> <img src="<? echo $picture; ?>" width="312" height="50" alt="<? echo $picture; ?> (83 bytes)"> <? // starting up PHP again... |
#3
| |||
| |||
Re: How to display image in PHP Page Check with this code. Code: <?php if (eregi("block-Angelo.php",$PHP_SELF)) { Header("Location: index.php"); die(); } $ufurl = "http://www.gocomics.com/espanol/condorito/"; $content = "<i>ufurl:</i> $ufurl<br>"; $imagefile = ""; if (!($textfile = fopen( "$ufurl", "r"))) { $content .= "$ufurl<br> could not be opened<br>"; die(); } while (!feof($textfile)) { $line = fgets($textfile, 1500); if (eregi( ".*<IMG .*SRC=\"(.*)\">.*", $line, $out)) { //if (eregi( ".*<center> <img src=".=\"(.*)\">.*", $line, $out)) { $imagefile = $out[1]; break; } } fclose($textfile); $content = "<p align=center>"; $content .= "<A HREF=\"http://www.gocomics.com/espanol/condorito\" target=\"_blank\"><IMG SRC=\"$imagefile\" alt=\"Condorito\"></A>"; ?> |
![]() |
|
Tags: display image, image in php, php code |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Insert an Image into a Web Page with XHTML | Udumbu | Guides & Tutorials | 1 | 19-05-2011 11:03 PM |
Convert any Web Page to Image / PDF | Flux | Software Development | 5 | 19-06-2009 09:03 PM |
CSS : Changing background image and length of a page to 100% | Yaropolk | Software Development | 4 | 20-05-2009 03:21 PM |
Upload image randomly with JavaScript Page | Zubeen | Software Development | 3 | 25-02-2009 02:54 PM |
IE 7 cannot display the web page | JoClarke | Technology & Internet | 2 | 22-01-2009 11:17 AM |