You are here: Exact code works and fails « PHP Language « IT news, forums, messages
Exact code works and fails

Posted by Kirk_ on 01/21/07 05:14

I have a website with some code that works fine, but on another website it
doesn't work.

I don't understand, it is really simple code.

Here is the code:

<?php include ("header.php");?>
<table width="600">
<tr>
<td>
<?
$ext = ".php";
$id = "".$con."".$ext."";
if (file_exists($id))
{
include($id);
} else {
include("main.php");
}
?>
</td>
</tr>
</table>
<?php include ("footer.php");?>

This is the entirety of index.php

index.php should default to contain main.php unless it is called with a
variable like:

index.php?con=addresspage

This works fine here:
http://www.willardfastlube.com

I have been working on a new site and it doesn't work. Both sites are hosted
linux sites at Godaddy.

Thanks,

Kirk

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация