Beginner struggeling with images.
Posted: 30. April 2021 20:02
Hi everyone,
I just started out with XAMPP, coding and Linux, so don't know a lot, yet.
When I try to paste an image, it does not show in my localhost-site, only that faulty-image-thingy that looks like a page torn in half. I am pretty sure I use the correct file path, I copied the one from the properties of the said image file.
The image is far less than 2 MB big and located in the same folder as the php code. Linking multiple pages (index page with pages from its links) hasn't been a problem.
Is this a known issue? How can I solve this? What am I doing wrong?
Thanks in advance!
(Also I can't seem to open control panel of XAMPP, but that's less of an issue, I just start it through terminal)
I just started out with XAMPP, coding and Linux, so don't know a lot, yet.
When I try to paste an image, it does not show in my localhost-site, only that faulty-image-thingy that looks like a page torn in half. I am pretty sure I use the correct file path, I copied the one from the properties of the said image file.
The image is far less than 2 MB big and located in the same folder as the php code. Linking multiple pages (index page with pages from its links) hasn't been a problem.
- Code: Select all
<html>
<head>
<title>GsVitamins</title>
</head>
<body>
<DIV style="position: absolute; top:100px; left:500px; width:200px; height:25px">
<h2>Vitamins</h2>
<?php
echo "<img src='/opt/lampp/htdocs/GsVitamins/rx.png'/>";
?>
</div>
<a href="index.php">Click here to go back<br/><br/>
</body>
</html>
Is this a known issue? How can I solve this? What am I doing wrong?
Thanks in advance!
(Also I can't seem to open control panel of XAMPP, but that's less of an issue, I just start it through terminal)