Solved

php how do I display an image?

Posted on 2014-10-26
3
135 Views
Last Modified: 2014-10-26
The url is http://lindamatthews.net/test/open.php

and open.php is

<?php error_reporting(E_ALL);?>
<?php include("header.php"); ?>
<?php include("menu.php"); ?>
<?php
echo "<div class=\"content\">";
echo "<img src=\"art/zen20.jpg\" style=height:425px>";
<?php include("footer.php"); ?>
?>

All I get is a blank screen. No image.
0
Comment
Question by:padmasambhava
3 Comments
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40405069
Change your code to the following, check the paths for the included files - what do you get?

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

include("header.php");
include("menu.php");

echo '<div class="content">';
echo '<img src="art/zen20.jpg" style="height:425px">';
echo '</div>';

include("footer.php");
?>

Open in new window

0
 
LVL 24

Expert Comment

by:mankowitz
ID: 40405083
also, try to view source. That might give you a hint.
0
 

Author Closing Comment

by:padmasambhava
ID: 40405164
Thanks to both of you!
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question