PHP Build a Basic PHP Website (2018) Building a Media Library in PHP Including the Header

Duc Duong
Duc Duong
8,670 Points

Index PHP file can't get the links to syle.css

When I execute the index PHP file on the MAMP localhost server, all the images and the style are lost. How can I fix this problem?

Corey Cramer
Corey Cramer
8,848 Points

Can you please include your directory structure as well as at least the head area of your index.php file? Without those two details, it is going to be really hard to provide valuable insight.

Duc Duong
Duc Duong
8,670 Points

<head> <title>Personal Media Library</title> <link href="css/style.css" rel="stylesheet" type="text/css"> </head>

Corey Cramer thank you for your support. This is the head area of my file. It doesn't link to the css file with .php, but with .html it is ok.

1 Answer

Dennis Amiel Domingo
Dennis Amiel Domingo
13,403 Points

Did you copy/paste the project CSS files in your htdocs folder as well?