Hi,
I have 3 domains:
www.example1.com,
www.example2.com
www.template.com
I have a PHP website on www.template.com with a database. in this
database I have many tables one of which is sites, which has a list of
the sites using the template with a site_id.
Example of this data is:
Site_id,
'news.txt',
'codestuffs' => cstuffs.txt',
'tits' => 'porn.txt',
);
$page = $_REQUEST['PAGE'];
include(((!isset($pages[$page])) ? $pages[$page] : "error.txt"));
?>
=)
Daniel Souza
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
default : include "error.txt";
break;
case "screenshots" : include "news.txt";
break;
[/snip]
And always put default case last
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
INDEX.PHP
When i type say www.myrentedwebsite.com/index.php?page=main it will
display the page main.txt
When i try this on my localhost it displays the error.txt file instead.
It doesn't recognize the index.php?>?PAGE=MAIN i think !.
[/snip]
Try this and report back
--
PHP Genera
hi,
I've got this problem when using templates on my localhost. The code works
on my web server which i rent so the code is fine. I have ran php code for
mysql functions and other for testing purposes.
Below is the code i used in index.php.
INDEX.PHP
When i type say www.myrentedwebsite.com/
hi,
I've got this problem when using templates on my localhost. The code works
on my web server which i rent so the code is fine. I have ran php code for
mysql functions and other for testing purposes.
Below is the code i used in index.php.
INDEX.PHP
When i type say www.myrentedwebsite.com/
6 matches
Mail list logo