Page 1 of 1

Xammp Not Recognizing my Included Files [Solved]

PostPosted: 05. April 2013 17:51
by donc1966
I'm developing some secure forms with the help of some online tutorials. I'm a novice with php. I have an index.php file that includes several other files like header, footer, login, widget, a css file, etc. When I upload my project to my host (GoDaddy) it displays correctly; the index file includes the other files and it displays with the styles I've coded. However, when I view the page from within Xampp (it is in the htdocs file in Xampp as it should be) it only displays the html code that is in the index.php and does not pull the other files in.

What is uploaded to GoDaddy is exactly the same as what I've placed in my htdocs folder. Because of this I'm assuming there is nothing wrong with my code - apparently there is something that I haven't enabled or configured in Xampp and I don't know where to start - any suggestions? Thanks ahead of time.

Re: Xammp Not Recognizing my Included Files

PostPosted: 06. April 2013 17:06
by donc1966
I discovered what it is. In the tutorial I used, the include statement was like this: <? include 'include/head.php'; ?>
That worked with GoDaddy, but not locally as I described above. I changed it to: <?php include("include/head.php"); ?> and it works just fine.
Hopefully that will help someone down the road...