<!DOCTYPE html>
<html>
<head>
<title>This is Hello World page</title>
</head>
<body>
<h1>Hello World</h1>
<img src= "<?php echo __DIR__ .'/pic.png' ?>">
</body>
</html>
I can't figure out why the code isn't showing the image. I made sure to name the file with a .php
extension and to put both files in the same folder (the desktop).
The eventual goal is to upload an entire folder to a server. Within that folder, there will be an index.php
file and an image. How can I point the file to the image?