selliottsxm Posted April 28, 2014 Share Posted April 28, 2014 HI, In chapter 12 we edited the header.html script and included for link 5 a php conditional. I thought that in order to process php the file extension had to be .php? However the script works perfectly. I must be wrong about the necessity of the .php file extension? Thanks, Steve Link to comment Share on other sites More sharing options...
Larry Posted April 28, 2014 Share Posted April 28, 2014 Good question! In order for the code to be processed as PHP, it has to use an extension that the web server recognizes as PHP. This is normally .php. However, the header.html script is included by a .php file, so it's as if the code in header.html is part of index.php (or whatever). If you ran header.html directly, it shouldn't execute the PHP code. Link to comment Share on other sites More sharing options...
selliottsxm Posted April 29, 2014 Author Share Posted April 29, 2014 Hey thanks Larry, I should have realized that! Link to comment Share on other sites More sharing options...
Recommended Posts