I'm working on a website project. I formerly designed and coded it on the mac. Everything was displaying and fucntioning correctly. When i tried loading my project through the pc, the pictures and headers are not showing up anymore. Plus the php codes are displaying on the page.

Dani AI

Generated

Good that PHP was resolved with AMPPS — that removes the biggest server-side red flag from the thread. With server-side parsing working (as reported by and anticipated by ), the remaining symptoms (images and header graphics not appearing) point to static-asset resolution, transfer, or HTML/CSS path issues rather than PHP itself. and touched on folder structure and markup; the following checklist and examples target the common, easy-to-miss causes that remain after switching machines.

Quick diagnostic checklist

  • Open browser DevTools (F12) → Network → filter for images, then reload. Note the exact request URL and HTTP status (200 / 404 / 403 / 500).
  • Paste the failing image URL into the address bar. A visible image means a CSS/HTML reference problem; a 404/403 points to wrong path, permissions, or server root.
  • If any URLs begin with file:/// instead of http://localhost/ the files are being opened directly from disk rather than through the local server — that changes how leading slashes and relative paths resolve.
  • If files were moved by FTP, confirm images were transferred in binary mode; ASCII transfers corrupt binary images.
  • Check for filename issues: hidden extensions, mismatched case, spaces/special characters (prefer hyphens), or Unicode normalization differences between macOS and Windows.

Practical examples (relative paths)

<!-- index.html located at project/ -->
<img src="images/logo.png" alt="Logo">

/* css/style.css located at project/css/ */
.header { background-image: url("../images/header.png"); }  /* path is relative to the CSS file */

Remember: url() in CSS is resolved relative to the stylesheet file, not the HTML page.

Other tricky causes: .htaccess rewrites or virtual-host DocumentRoot mismatches, symlinks that exist on macOS but not on Windows, and malformed HTML that some browsers recover differently from (validate the markup). A quick isolation test is to place one known-good image and a single test.html in the webroot; if that loads via http://localhost/test.html the problem is path/markup; if it fails, check server logs and transfer method.

Recommended Answers

All 10 Replies

the pictures and headers are not showing up anymore.

Check the path to the images in your HTML code. They may not be pointing to the correct location. Feel free to post some of your revalent code and the structure of the directory.

Plus the php codes are displaying on the page.

If you are coding in PHP, the web server that you upload your web site to has to support PHP, otherwise, the web server will treat the PHP code as text and simply display it back to the browser as text.

Not every browser/computer is the same...

JorgeM solution is one of the easiest solutions to follow :)

I tried everything, but my codes are still showing up on the screen. I'm using the WAMP Server on windows and MAMP Sever on the Mac. Which codes should i display for y'all? I have several pages.

I managed sorting out the display of codes. JorgeM was right that my server doesn't support it. I downloaded the AMPPS Server and the pages are working perfectly. Still facing the problem of displaying the pictures.

Do you have this site online so we can take a look? If so, provide the URL.

Nopes its not online.

Ok with regard to your images, it is most likely a problem with your srv attribute for the Img element. Post a sample of one of your image elements.

do you have the images in a seperate folder if so make sure that you are pointing to that folder

Make sure you declare a doctype, and check to see if the tags are all there. Sometimes you will forget an end tag, and some browsers/computers will automatically put one in there, and then some won't

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.