Zymic Forums

Webmaster resources

Zymic IRC Server

Chat in real time at irc.zymic.com - Learn More

Welcome

Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.

In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.

left Zymic Webmaster ForumsZymic Free Web HostingZymic Free Web Hosting - General Discussion & Help right
  Closed Topic Start new topic
left right
someone753951
post Apr 20 2008, 06:16 PM
Post #1


Newbie
*

Group: Members
Posts: 9
Joined: 20-April 08
Member No.: 20,842



Hi,

I'm new here. I recently uploaded my site. I use the include functions to include the text (content) and menu on my site. But when I go to my site, it doesn't show the things that I normally include. My site is someone753951.zzl.org. It's like PHP isn't even enabled. I hope someone can help me out.

PS: This is the code I use:
to include the menu:
CODE
<?php include("menu.html"); ?>

to include the content:
CODE
<?php
$pages = array("home", "about", "downloads", "trusted", "contact", "upload");

if (isset($_GET['page']) && !empty($_GET['page']))
{
    if(in_array($_GET['page'], $pages) && file_exists($_GET['page'].".html"))
    {
        include($_GET['page'].".html");
    }
    else
    {
        include("404.html");
    }
}
else
{
    include("home.html");
}
?>
Go to the top of the page 
 
  + Quote Post
Andrew
post Apr 21 2008, 02:27 AM
Post #2


Hosting Abuse Staff
*******

Group: Moderators
Posts: 2,933
Joined: 14-February 08
From: Fort Myers FL, USA
Member No.: 10,089



Make sure your pages end with .php
php code will NOT work inside of pages with .html extension.
If thats not the case, please reply.
Go to the top of the page 
 
  + Quote Post
someone753951
post Apr 21 2008, 05:14 PM
Post #3


Newbie
*

Group: Members
Posts: 9
Joined: 20-April 08
Member No.: 20,842



Ah, thanks.. They were .html... At my webserver they did work.. But i'll change it. Thanks
Go to the top of the page 
 
  + Quote Post
Andrew
post Apr 21 2008, 07:55 PM
Post #4


Hosting Abuse Staff
*******

Group: Moderators
Posts: 2,933
Joined: 14-February 08
From: Fort Myers FL, USA
Member No.: 10,089



Yea, I don't know what web server you were using but sometimes they can allow things like that but it's always better to learn and do things the right way.

I'm just glad to see you use <?php and not <? for your tags.
Go to the top of the page 
 
  + Quote Post
 Closed Topic Start new topic
left right
0 Members:
left right
 


Lo-Fi Version Time is now: 20th May 2013 - 07:15 AM