1

I'm trying to anchor link from my HTML page to PHP. But when I click on whatever the links download window of the page will appear. If I leave the link as an HTML file, the link to another page works properly, but with PHP it starts to download.

 <ul class="netflix-list">
        <li><a href="index-en.php">Home</a></li>
        <li><a href="index-en.php#about">About</a></li>
        <li><a href="index-en.php#services">Services</a></li>
        <li>
          <ul>
            <li><a href="tattoo-en.html">Tattoo</a></li>
            <li><a href="beauty-en.html" class="gold">Beauty</a></li>
            <li><a href="piercing-en.html">Piercing</a></li>

          </ul>
        </li>
        <li><a href="index-en.php#contact">Contact</a></li>
        <li>
          <a href="beauty.html">Danish</a><img src="/images//denmark.svg" alt="danish-flag" class="flag" />
        </li>
Paco
  • 45
  • 5
  • Are you on a server e.g (wamp, xampp) or just running the files locally? – otejiri Feb 15 '20 at 20:44
  • What have you tried to debug the problem? There is no PHP code given in the question, neither do I see any connection to Javascript – Nico Haase Feb 18 '20 at 10:47

1 Answers1

1

To run PHP files you need to be on a server like Apache, if you try to access .php files without a server that accepts php it won't understand the request and will end up downloading the file.

You can Install WAMP or XAMPP(mac) and access your PHP files

otejiri
  • 1,017
  • 6
  • 20