I have a page with this code:
<?php
if ($_SERVER['REQUEST_METHOD'] !== 'GET') {
header('HTTP/1.0 405 Method Not Allowed');
exit(); }
If I access it with a form in GET method, it works, and doesn't exit, which is ok.
But when I try to access this file directly, I would expect the file to perform the exit -
unless, a GET request is sent automatically whenever one access a file, even when not through a form?