I am using XAMPP for APACHE server on localhost:8080 (I had to change the default port for it to work). Assume that I have the rest of the html needed to run. Here is the current code:
home.html
<body>
<script src="main/profile.php"></script>
</body>
profile.php
<?php
$imagepath ="omj/logo.jpg";
$image = imagecreatefromjpeg( $imagepath);
header('Content-Type: image/jpeg');
imagejpeg($image);
?>
I tried referencing the following articles to no avail:
http://www.configure-all.com/howto_display_image.php
How to display images from a folder using php - PHP
Edit I got the image to work using HTML by simply moving the image folder inside the html folder. Now the question remains, why isn't the php code running to show the image?
The image path is within the directory of the html file. Like this: /htmlfolder/imagefolder/image.jpg while html file is /htmlfolder/file.html