2
아래 코드로 이미지를 보내면 uploadImage.php, POST 메서드를 통해 String 매개 변수를 어떻게 추가합니까? 내가 제대로 이해하면PHP에 매개 변수 추가
<?php
$hasError = false;
foreach($_FILES as $i=>$file)
{
if ($file['error'])
{
$hasError = true;
}
}
if (! $hasError)
{
$myFilePath = '_uploads/'.'_'.$file["name"];
$dta = file_get_contents($file['tmp_name']);
file_put_contents($myFilePath, $dta);
}
else
{
echo('Stick custom error message here');
}
?>
을 .. 어떻게 문자열 매개 변수를 어디에 추가합니까? –