xampp如何上传文件到服务器,通过xampp上传文件

这会帮助你

PHP代码

if(isset($_POST['editlogopic']))

{

$logopic = ($_FILES['logopic']['name']);

$logopicExt = end(explode('.', $logopic));

$logopicExt = strtolower($logopicExt);

if($logopic!="")

{

if($logopicExt != "png" && $logopicExt != "svg")

{

$file_upload="false";

$errorMsg=$errorMsg."

Image file should be .png or .svg type
";

}

}

if($errorMsg=='')

{

$targetlogopic = 'temp_name'.".".$logopicExt;

$target_image_gallery_info = "../images/";

move_uploaded_file($_FILES['logopic']['tmp_name'], $target_image_gallery_info.basename($targetlogopic));

header('Location: info?ref=success');

}

else

{

$msg = '

Background Image not Change!
';

}

}

HTML代码

Logo Image

<?php%20echo%20%24row1%5B'logopic'%5D?>?<?php%20echo%20%24dummy;%20?>

Image

Update

send