Author Topic: Template Editing Help  (Read 4982 times)

0 Members and 1 Guest are viewing this topic.

Offline smrtguy

  • Pre-Newbie
  • Posts: 3
    • View Profile
Template Editing Help
« on: June 26, 2002, 06:54:15 PM »
I am trying to intergrade my site my 4images. To do this i want to make a copy of the index page but instead of links to categories and new images i wanna display news, using a simple php include script. But when i execute the page i receive this error.

Code: [Select]

<?php
 
include &#40;"$xg.html"&#41;; 
?>



Error Msg:
Warning: Failed opening '.html' for inclusion (include_path='.:/usr/lib/php') in /home/sgr/public_html/downloads/includes/template.php(139) : eval()'d code on line 189

I beleive that the variable isn't being recognized by the script :?: . Plz Help me if u can.

Here is the url to the page with the error http://sgr.l33t.ca/downloads/home2.php?xg=news

Offline smrtguy

  • Pre-Newbie
  • Posts: 3
    • View Profile
Template Editing Help
« Reply #1 on: June 26, 2002, 10:05:21 PM »
It's me again; I've been tinkering with the script and it executes fine when i define the variable in the script but not when i define through the url. I also tested to make sure this wasn't the server fault by placing another file with the same include script and defining the variable through the url, this script executed fine plz help me.

Offline VnxDragon

  • Newbie
  • *
  • Posts: 27
    • View Profile
Template Editing Help
« Reply #2 on: June 26, 2002, 10:12:24 PM »
Hi, umm I don't think that's the proper way to use the include command. When I include my news this is how I do it, I first make a new html file, then I use the proper include command and include it on that html file. Then on my Php I include that html file. So basically three steps, and you should recheck your include command.

Offline smrtguy

  • Pre-Newbie
  • Posts: 3
    • View Profile
Template Editing Help
« Reply #3 on: June 27, 2002, 04:01:58 AM »
No i have tested this include script. This let me include many files in one php file. for example i can load html files called new, new2 & new3 into the same php file by simply changing the url.

index.php?variable=news
index.php?variable=news2
index.php?variable=news3