PHP? ??? ??? ?? ??? ?? ??
PHP? ?? ??? ??? ???? ? ????.
?? ??? ?? ??? ?? ???? ????? ?? ???? ?????.
?? <from>
??? <form> ??? ???? ???. input> ??? ??
<form> ??? enctype ??? ??? ??? ? ??? ??? ??? ?????. ??? ?? ???? ?? ???? ???? ??? ?? "multipart/form-data"? ?????.
<input> ??? type="file" ??? ??? ??? ????? ?? ?????. ?? ?? ?????? ?? ? ? ?? ?? ?? ???? ??? ?????.
? ??, ??? ???? .php ??? ?????
PHP? ?? ?? $_FILES? ???? ????? ????? ?? ??? ??? ???? ? ????.
$_FILES ??? ??? ??? ????.
$_FILES['myFile']['name'] ????? ??? ?? ??
$_FILES['myFile'][' type'] ?? ??? MIME???. ????? "image/gif"? ?? ? ??? ?? ??? ???? ???.
$_FILES['myFile']['size'] ???? ??? ??(???)
$_FILES['myFile'] ['tmp_name'] ?? ??? ? ??? ???? ?? ?? ??? ????? php.ini? upload_tmp_dir? ??? ? ??? ??? ?? ?????. putenv() ??? ???? ????.
$_FILES[' myFile']['error'] PHP 4.2.0 ???? ??? ?? ?????. ??: (PHP 3.0 ???? ??? ?????.)
??, PHP ??? ??? ?? ??? ?????
?: ??? ?? ??, ?? ?? ??(?? ?? ??? 2MB ????? ?), ?? ?? ?? (???? .gif, .jpeg, .jpg, .png ??? ???? ? ??) ?
??, ???? ???
??? ????? ??????? ?????, ?? ???? ???? ??? ???? ?????.
? ??? ?? ?? ??? ??? ???? ??? ???? ? ??? ????.