Im tying to include a .jpg but it shows up as letters, symbols, and question marks.
<?php
// Story Image
// Define allowed $_GET values, check if file exists, and if allowed; include it:
if (preg_match( '/^\D{3}p\d{2}s\d{2}$/', $_GET['img'] ) && file_exists('includes/Stories/StoryImages/' . $_GET['img'] . '.jpg')) {
include ('includes/Stories/StoryImages/' . $_GET['img'] . '.jpg');
}
// If the page is not allowed, send them to an error page:
else {
// This sends the 404 header. UNCOMMENT IF NEEDED...:
//header("HTTP/1.0 404 Not Found");
// This includes the error page:
include ("includes/error.php");
}
?>
I even tried just adding <img src="blah/blah/blah.jpg" /> to the .php page with the rest of the html in the spot where i want it. And it only shows up in dreamweaver but not over the web. ex...
// Story Text
// Define allowed $_GET values, check if file exists, and if allowed; include it:
if (preg_match( '/^\D{3}p\d{2}s\d{2}$/', $_GET['id'] ) && file_exists('includes/Stories/' . $_GET['id'] . '.php')) {
include ('includes/Stories/' . $_GET['id'] . '.php');
}
// If there is no $_GET['id'] defined, then serve the homepage:
elseif (!isset($_GET['id'])) {
include ("includes/blank.php");
}
// If the page is not allowed, send them to an error page:
else {
// This sends the 404 header. UNCOMMENT IF NEEDED...:
//header("HTTP/1.0 404 Not Found");
// This includes the error page:
include ("includes/error.php");
}
?>
and this is an example .php file with the story + picture. The text shows u pbut not the picture.
<h2>Welcome from the Executive Editor</h2>
<p>Power On
<br />
<br />
It is my pleasure to introduce the inaugural issue of the Executive Series – a magazine devoted to introducing
you to the businesses, people and industries that are driving Washington County’s economy forward.
Building on the nine year success of the Washington County Business Journal, this publication
will focus on the business and economic developments occurring right now in our county as well as
provide you with comprehensive information on why our county economy is outperforming our national
economy. The Executive Series is a collaboration among the Washington County Chamber of Commerce,
Washington Industrial Development Corporation, Washington County Industrial Development Authority
and Observer Publishing Company made possible through resources from the Washington County Local
Share Account and our generous advertisers.
<br />
<br />
Our inaugural issue will concentrate on energy and the tremendous opportunities our county is witnessing
in the coal and natural gas industries. In fact, we chose for our cover story an exclusive one-on-one interview
between J. Brett Harvey, President & CEO of CONSOL Energy, Inc. and CEO CNX Gas Corporation and
Michael Bradwell, Business Editor for the Observer-Reporter discussing CONSOL’s market leadership in coal
and energy production as well as their civic commitment to our region. Also, in what is being called the next
“Gold Rush”, we will explore the development of the natural gas industry and discuss its potential with industry
leading companies such as Range Resources and MarkWest. Finally, we will discover what all of this
development means to our county, our business community and to you as we discuss jobs, economic growth
and new possibilities.
<br />
<br />
These two industries-coal and natural gas-are not only resources for our country, but also significant
prospects for local economic growth. We hope you explore the opportunities found in these industries as
well as those found in Washington County.
<br />
<br />
</p>
<img src="/businessjournal/includes/Stories/StoryImages/junp02s01.jpg" width="265" height="377" />
i prefer to use the second option and avoid using another $_GET value