查看文件: shop_upload.php
大小: 1.17 KB
类型: application/octet-stream
<?php require_once('../Connections/BE2.php'); ?> <? if( isset($_POST["MM_update"]) && $_POST["MM_update"] == "fp1"){ $logpath="/www2/skybni/upimg/log.txt"; $picpath='/www2/skybni/upimg/img_shop/'.$_POST['jpg'].'.jpg'; if($_FILES['fileToUpload']["name"]<>''){ move_uploaded_file($_FILES['fileToUpload']["tmp_name"],$picpath); } $updateSQL = sprintf("UPDATE webshop SET mcapture='1' WHERE coid='%s' AND windex=5 ",GetSQLValueString($_POST['jpg'], "int")); mysql_select_db($database_BE2, $BE2); $Result1 = mysql_query($updateSQL, $BE2) or die(mysql_error()); $fp = fopen($logpath, "a"); $ref=isset($_SERVER['HTTP_REFERER'])?$_SERVER['HTTP_REFERER']:""; fwrite($fp,"start log ".$ref." response " .date('Y-m-d H:i:s')."\r\n"); $a=count($_POST); if($a>0){ foreach($_POST as $key=>$value){ // echo "$key=$value"; $s= urldecode($value); fwrite($fp,"$key=$s"."\r\n"); } } fwrite($fp,"======= end upload_shop.php jpg=194 jpg=170================="."\r\n"); fclose($fp); echo "OK1" ; } else{ echo "OK2" ; } ?>
保存
取消
返回文件列表