treehouse : what would you like to learn today?
Web Design Web Development iOS Development

[Solved] My php is being turned into a comment.

  • Alright so this is what i am trying to do, nothing fancy, just a simple include file, for a file that i use often. Now i know about next to nothing when it comes to php so please talk slow and enunciate. Here is the html/php <?php include("../../galleria-head.php") ;?>the rest of html.

    Now the file galleria-head.php is located inside a directory of portfolio/. The html file that is calling the php file is located in portfolio/senior-pics/index.html. So the file paths are correct. But for some reason the html turns that <?php include(''); ?> into a comment. Am i doing something wrong? Do i need to do something to my html file so it isn't turning it into a comment?

  • Yuh, html files can't call php files like that. try changing the .html extension to a .php extension then try.