Uhh..having some trouble with php includes?

  • Thread starter Thread starter mPsK84lYfe
  • Start date Start date
M

mPsK84lYfe

Guest
Well, I'm "converting" my site from using html to using php. I recently discovered that my php includes won't work. For example, lets say I have a directory called "Resources". Under that, I have a file that's named "brushes.php". On the sidebar, I want to use a php include to show the updates to the site.

I first used this:
<?include ("latestupdate.php");?>

Then I tried this:
<?include ("http://www.mysite.com/site/latestupdate.php");?>

I was sure the second one would work but no luck. So any help would be greatly appreciated.
 
The relative reference should have worked. That's not the problem.

So the page is named "brushes.php" and it includes a file named "latestupdate.php". Is brushes in the exact same directory? Does it only include the exact code you want inserted, with no doctype or extra html code? Check your spelling, too. It's easy to make a typo.

Do you have the short php declaration enabled? It is universally considered better form to use "<?php" than "<?".
 
My first guess is that you don't have PHP available on your server. Check with your ISP.
 
Back
Top