At 19:10 19.11.2002, Adam said:
--------------------[snip]--------------------
>Thanks, but not sure if this is what i'm looking for....
>
>I just want to setup the PHP script so that the variable $filename can be
>changed via a link such as 'index.php?filename="file.xml"',
>causing the script to parse the appropriate file.
--------------------[snip]--------------------
When you execute the URL
index.php?filename=file.xml
(note - no quotes)
your PHP script will have this value readily accessible as $filename (if
register_globals is on, as outlined in many threads the last days).
With the latest PHP versions, register_globals defaults to off, so you
don't have "$filename" but rather $_GET['filename'] available.
If your PHP host has register_globals off, but you need parameters as
globals, you can put this little script at the beginning of your PHP file:
foreach ($_REQUEST as $varname => $value) {
$var = '$'.$varname;
global $$var;
$$var = $value;
}
You will then be able to access parameters as if register_globals would be on.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php