I have a really strange problem with a web host that I've recently signed up to.
So I have some code which is pretty standard as you may agree. (narrowed it down to get and set in a system I'm creating)
Code: Select all
<?php
$hello = $_GET['hello'];
echo $hello;
?>
If the url is hello.php?hello it works
I'm a fairly intermediate php programmer and have never in all my time with servers and hosting come across this. I've tried replicating it locally to no avail and the web host just says don't use that code use something else or it's a problem with your code. Which is fairly useless to me.
Has anyone got any ideas how I can get around this. I still need to use $_GET or $_REQUEST. Just really need the page to parse if the url vars do not exist.
It looks a bit rubbish if someone just goes to hello.php or infact the system I'm making it'll be under index.php so the whole lot wouldn't show anyway.
The server is Windows Server 2008 IIS, and the PHP version is 5.
Thanks in advance.