The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

My php is being turned into a comment.

  • # November 17, 2012 at 9:32 am

    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?

    # November 17, 2012 at 9:47 am

    This reply has been reported for inappropriate content.

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

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed