XBL
Verified User
Hi,
I'm currently scripting a custom plugin (and once I get the hang of it, I'll make some cool addons for DA ), but I'm stuck on a problem that I can't use get-vars (like: $_GET['var']).
I searched the forum for a bit, so I knew that it wasn't possible to use it with DA, so I made this little workaround (stole it from the awstats-plugin, sorry fusionictnl ):
According to php.net/parse_str I should be able to use something like this:
If I was requesting a document like index.html?foo=bar and it would echo 'bar'. But too bad, DirectAdmin doesn't like this and gives me this error:
Does anyone know what's wrong with this? It sucks if you can't use GET vars (haven't tested POST vars, can I use them normally?).
Thanks,
Jochem
I'm currently scripting a custom plugin (and once I get the hang of it, I'll make some cool addons for DA ), but I'm stuck on a problem that I can't use get-vars (like: $_GET['var']).
I searched the forum for a bit, so I knew that it wasn't possible to use it with DA, so I made this little workaround (stole it from the awstats-plugin, sorry fusionictnl ):
PHP:
// Fix to use _get-vars in DA
parse_str($_SERVER['QUERY_STRING'], $GET);
According to php.net/parse_str I should be able to use something like this:
PHP:
echo $GET['foo'];
That plugin does not exist for the specified User Level
Does anyone know what's wrong with this? It sucks if you can't use GET vars (haven't tested POST vars, can I use them normally?).
Thanks,
Jochem