Search code examples
phphtmlherokustaticheroku-cli

Unable to deploy static website to heroku, html and css not loading from php


So I am trying to deploy static website to heroku but the main page isn't loading the html/css files.

Link to app: https://randomstockpicker.herokuapp.com/

when I looked at the source code it shows:

<?php include_once("home.html"); ?>

this php code isn't loading the "home.html" file, the file exists and is uploaded as well.

I also got composer.json : {}

I followed this tutorial: https://medium.com/@agavitalis/how-to-deploy-a-simple-static-html-website-on-heroku-492697238e48


Solution

  • Instead of using:

    <?php include_once("home.html"); ?>
    

    this worked perfectly

    <?php include_once("./home.html"); ?>