Jump to content


Photo
- - - - -

How to use php include correctly?


  • Please log in to reply
1 reply to this topic

#1 Bjarne

Bjarne

    Etomite Forum Fan

  • Member
  • Pip
  • 94 posts

Posted 02 June 2008 - 07:03 PM

I was excited to see that you now can embed php in the templates and chunks, and I have enabled the function, but can't seem to get it to work with a straight forward include. I have a file on my root that collect a bunch of data from a database into a neat table. To list it on a eto-page I tried making a chunk with these different statements:

1: <?php include ("/data.php"); ?>

2: <?php include ("http://mysite.com/data.php"); ?>

3: <?php include ("the/long/wirtual/severpath/mysite.com/data.php"); ?>


None of them want to show the content of my file. Why not, and how do I do it correctly?

#2 Dean

Dean

    Loves Etomite Forums!

  • Admin
  • 4,787 posts

Posted 02 June 2008 - 07:50 PM

There's a PHP Include snippet.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users