I made a site, and I wand to upload files through a php form, but when I try to do so, I have the following error:405 Not Allowed nginx. Can anyone help me?
I have checked my php.ini file, and file_uploads were on by default
<!DOCTYPE html>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<form method="post">
Enter Your Text Here:<br>
<input type="text" name="textdata"><br>
<input type="submit" name="submit">
</form>
</body>
</html>
<?php
if(isset($_POST['textdata']))
{
$data=$_POST['textdata'];
$fp = fopen('data.txt', 'a');
fwrite($fp, $data);
fclose($fp);
}
?>