2
当我通过POST方法将图像发送到下面的代码uploadImage.php时,如何添加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');
}
?>
.. 。你如何在其中添加一个字符串参数? – 2010-05-14 00:55:14