Solved

php how do I display an image?

Posted on 2014-10-26
3
127 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
PHP Variable into a number 3 35
Wordpress syntax error 1 29
Jquery Autocomplete PHP script 3 21
php variable basic question 12 29
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…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now