Web space requires url’s. Url’s to a webserver are all relative to the “web root” as defined by your web server configuration.
When you open a local file, you are working with your workstation file system, and the rules of the operating system. The 2 systems are incompatible.
This resource is returned to you by the webserver, but you really have no idea where it actually resides within the google infrastructure. It could be an image that was generated on the fly, by some software, and not a physical image located on any server or storage system.
C:\wamp64\www\ecom\images\somefile.jpg is a path to a file on a windows computer. That is not “web space”.
Within web space, you typically define the path to resources like static images relative to the webroot. So your markup would be something like:
<img src="/images/<?= $productImg ?>" alt="picture of product">
This is just a made up example on my part that shows one way markup might be using a php variable and appending it a string using php’s ability to intermix php and html.
Assume that $productImg = “newproduct.jpg” here.
It should be apparent that the effective url to the image in web space is “/images/newproduct.jpg”.
If you aren’t clear on how you have configured your localhost web server, make a php script that has nothing in it other than:
The configured directory that is the web root for your server will be listed as the DOCUMENT_ROOT.
Anything in your html requires url’s, not file system paths.
Hopefully it is clear in this example that if the webroot is:
And your html needs to reference the file on your filesystem that is:
Then the relative path to that would be:
You probably already know what the webroot is, because it’s the same directory where you have the index.php or whatever other script is that you ran to display the broken images.
Fix the img src’s to use relative paths to your webroot. My guess is that your webroot is pointing to C:\wamp64\www\ecom, but again you can verify that and fix your url’s accordingly.