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,
?
$pages = array
(
'screenshots' = '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:
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
?php
switch ($page)
{
default : include
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
?php
switch ($page)
{
default : include
[snip]
INDEX.PHP
?php
switch ($page)
{
default : include error.txt;
break;
case screenshots : include news.txt;
break;
}
?
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
[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
6 matches
Mail list logo