thanks in advance,
sole
What do you mean by 'single file'?
I suspect you mean using dynamic overlays to avoid repeat round trips to
the server. php runs server side so you can't use it for such purposes.
You're stuck with javascript or flash.
sole was scribbeling:
> i've been looking for tutorials that show you how to make single file
> websites using php and i haven't been lucky. does anyone know of any?
if i understand correctly, the easiest way is:
index.php [untested code]
<?php
if(strpos($HTTP_GET_VARS['id'],'..')!==FALSE
||strpos($HTTP_GET_VARS['id'],'/')!==FALSE)
die("error: dir traversal");
include($HTTP_GET_VARS['id'].'.php');
?>
called: http://srv.domain.tld/path/to/index.php?id=home
will cause home.php to be returned as 'index.php'.
note:
- the first line in the above script does some basic dir-traversal
checking, but cannot be seen as secure.
- your approach does work, but is not recommendet, as you'll have
to manage the files to be included anyway
hth andreas
--
collect xul annotations: http://xul.andreashalter.ch/
sole
"andreas halter" <ne...@andreashalter.ch> wrote in message
news:b8r0aq$ukf$1...@innferno.news.tiscali.de...
http://terencekearns.com/skinny
can I ask what is the reason in particular that it has to be a single file?