Wykorzytałem standardowe rozwiazania czyli formularz:
Kod
<form enctype="multipart/form-data" action="add.php" method="POST">
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="300000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
<!-- MAX_FILE_SIZE must precede the file input field -->
<input type="hidden" name="MAX_FILE_SIZE" value="300000" />
<!-- Name of input element determines name in $_FILES array -->
Send this file: <input name="userfile" type="file" />
<input type="submit" value="Send File" />
</form>
I kod php w pliku add.php:
<?php $uploaddir = '/domains/frak.com/public_html/werk/strona/photo/'; } else { } ?>
Ale pojawia się komunikat:
Kod
Possible file upload attack!
Here is some more debugging info:Array
(
[userfile] => Array
(
[name] => foto.jpg
[type] =>
[tmp_name] =>
[error] => 2
[size] => 0
)
)
Here is some more debugging info:Array
(
[userfile] => Array
(
[name] => foto.jpg
[type] =>
[tmp_name] =>
[error] => 2
[size] => 0
)
)
Czy ktoś może wie gdzie tkwi błąd? Chmody ustawione na 777.