当前位置: 首页>>代码示例>>PHP>>正文


PHP makeUpload函数代码示例

本文整理汇总了PHP中makeUpload函数的典型用法代码示例。如果您正苦于以下问题:PHP makeUpload函数的具体用法?PHP makeUpload怎么用?PHP makeUpload使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了makeUpload函数的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getFileExtention

 $sqlUpdateField = "";
 if ($_POST['chkClearImg'] == '') {
     $extsmall = getFileExtention($_FILES['txtImage']['name']);
     if (makeUpload($_FILES['txtImage'], "{$path}/" . $actConfig . "_s" . $oldid . $extsmall)) {
         @chmod("{$path}/" . $actConfig . "_s" . $oldid . $extsmall, 0777);
         $sqlUpdateField = " image='{$pathdb}/" . $actConfig . "_s" . $oldid . $extsmall . "' ";
     }
 } else {
     if (file_exists('../' . $r['image'])) {
         @unlink('../' . $r['image']);
     }
     $sqlUpdateField = " image='' ";
 }
 if ($_POST['chkClearImgLarge'] == '') {
     $extlarge = getFileExtention($_FILES['txtImageLarge']['name']);
     if (makeUpload($_FILES['txtImageLarge'], "{$path}/" . $actConfig . "_l" . $oldid . $extlarge)) {
         @chmod("{$path}/" . $actConfig . "_l" . $oldid . $extlarge, 0777);
         if ($sqlUpdateField != "") {
             $sqlUpdateField .= ",";
         }
         $sqlUpdateField .= " image_large='{$pathdb}/" . $actConfig . "_l" . $oldid . $extlarge . "' ";
     }
 } else {
     if (file_exists('../' . $r['image_large'])) {
         @unlink('../' . $r['image_large']);
     }
     if ($sqlUpdateField != "") {
         $sqlUpdateField .= ",";
     }
     $sqlUpdateField .= " image_large='' ";
 }
开发者ID:ece4u,项目名称:ece4cWeb,代码行数:31,代码来源:content_link_m.php

示例2: substr

     $extsmall = substr($_FILES['txtImage']['name'], -4, 4);
     if (makeUpload($_FILES['txtImage'], "{$path}/" . $nameImage . "_" . $oldid . "_s" . $extsmall)) {
         @chmod("{$path}/" . $nameImage . "_" . $oldid . "_s" . $extsmall, 0777);
         $sqlUpdateField = " image='{$pathdb}/" . $nameImage . "_" . $oldid . "_s" . $extsmall . "' ";
     }
 } else {
     if (file_exists('../' . $r['image'])) {
         @unlink('../' . $r['image']);
     }
     $sqlUpdateField = " image='' ";
 }
 // KET THUC THEM HINH image
 //THEM HINH ImgLarge
 if ($_POST['chkClearImgLarge'] == '') {
     $extlarge = substr($_FILES['txtImageLarge']['name'], -4, 4);
     if (makeUpload($_FILES['txtImageLarge'], "{$path}/" . $nameImage . "_l" . $oldid . $extlarge)) {
         @chmod("{$path}/" . $nameImage . "_l" . $oldid . $extlarge, 0777);
         if ($sqlUpdateField != "") {
             $sqlUpdateField .= ",";
         }
         $sqlUpdateField .= " image_large='{$pathdb}/" . $nameImage . "_l" . $oldid . $extlarge . "' ";
     }
 } else {
     if (file_exists('../' . $r['image_large'])) {
         @unlink('../' . $r['image_large']);
     }
     if ($sqlUpdateField != "") {
         $sqlUpdateField .= ",";
     }
     $sqlUpdateField .= " image_large='' ";
 }
开发者ID:bestwishforyou95,项目名称:congnghemoitruong,代码行数:31,代码来源:tab_m.php

示例3: end

         //xoa file cu
         if ($r['image_large1'] != '') {
             @unlink($r['image_large1']);
         }
     }
 }
 //hinh 4
 //$ArrImage			=	array('jpg','gif','bmp','jpeg','png');
 //$nameImage			=	trim(str_replace("-", "",$nameMember));
 //hinh Avatar
 $filenameAvatar4 = $_FILES['txtImageLarge2']['name'];
 $extlargeAvatar4 = end(explode(".", $filenameAvatar4));
 //exit();
 if (array_keys($ArrImage, $extlargeAvatar4)) {
     $file_nameInputAvatar4 = "{$path}/" . $nameImage . time() . "_Avatar4." . $extlargeAvatar4;
     if (makeUpload($_FILES['txtImageLarge2'], $file_nameInputAvatar4)) {
         @chmod($file_nameInputAvatar4, 0404);
         if ($sqlUpdateField != "") {
             $sqlUpdateField .= ",";
         }
         $sqlUpdateField .= " image_large2='" . $file_nameInputAvatar4 . "' ";
         //xoa file cu
         if ($r['image_large2'] != '') {
             @unlink($r['image_large2']);
         }
     }
 }
 if ($sqlUpdateField != '') {
     $sqlUpdate = "update " . $tableNewId . " set {$sqlUpdateField} where id='" . $oldid . "'";
     $sqlUpdate1 = "update " . $tableNew . " set {$sqlUpdateField} where id_code='" . $oldid . "'";
     @mysql_query($sqlUpdate, $conn);
开发者ID:bestwishforyou95,项目名称:congnghemoitruong,代码行数:31,代码来源:post_193.php

示例4: values

 if ($errMsg == '') {
     if (!empty($_POST['id'])) {
         $oldid = $_POST['id'];
         $sql = "update " . $tableConfig . " set code='" . $code . "',name='" . $name . "', parent='" . $parent . "',subject='" . $subject . "',short_description='" . $short_description . "',full_description='" . $full_description . "', sort='" . $sort . "', status='" . $status . "',last_modified=now(), lang='" . $lang . "',price='" . $price . "' where id='" . $oldid . "'";
     } else {
         $sql = "insert into " . $tableConfig . " (code, name, parent, subject, short_description, full_description, sort, status,  date_added, last_modified, lang,price) values ('" . $code . "','" . $name . "','" . $parent . "','" . $subject . "','" . $short_description . "','" . $full_description . "','" . $sort . "','" . $status . "',now(),now(),'" . $lang . "','" . $price . "')";
     }
     if (mysql_query($sql, $conn)) {
         if (empty($_POST['id'])) {
             $oldid = mysql_insert_id();
         }
         $r = getRecord($tableConfig, "id=" . $oldid);
         $sqlUpdateField = "";
         if ($_POST['chkClearImg'] == '') {
             $extsmall = getFileExtention($_FILES['txtImage']['name']);
             if (makeUpload($_FILES['txtImage'], "{$path}/" . $actConfig . "_s" . $oldid . $extsmall)) {
                 @chmod("{$path}/" . $actConfig . "_s" . $oldid . $extsmall, 0777);
                 $sqlUpdateField = " image='{$pathdb}/" . $actConfig . "_s" . $oldid . $extsmall . "' ";
             }
         } else {
             if (file_exists('../' . $r['image'])) {
                 @unlink('../' . $r['image']);
             }
             $sqlUpdateField = " image='' ";
         }
         /*if ($_POST['chkClearImgLarge']==''){
         				$extlarge=getFileExtention($_FILES['txtImageLarge']['name']);
         				if (makeUpload($_FILES['txtImageLarge'],"$path/".$actConfig."_l".$oldid.$extlarge)){
         					@chmod("$path/".$actConfig."_l".$oldid.$extlarge, 0777);
         					if($sqlUpdateField != "") $sqlUpdateField .= ",";
         					$sqlUpdateField .= " image_large='$pathdb/".$actConfig."_l".$oldid.$extlarge."' ";
开发者ID:ece4u,项目名称:ece4cWeb,代码行数:31,代码来源:product_m.php

示例5: getFileExtention

 $sqlUpdateField = "";
 if ($_POST['chkClearImg'] == '') {
     $extsmall = getFileExtention($_FILES['txtImage']['name']);
     if (makeUpload($_FILES['txtImage'], "{$path}/product_category_s{$oldid}{$extsmall}")) {
         @chmod("{$path}/product_category_s{$oldid}{$extsmall}", 0777);
         $sqlUpdateField = " image='{$pathdb}/product_category_s{$oldid}{$extsmall}' ";
     }
 } else {
     if (file_exists('../' . $r['image'])) {
         @unlink('../' . $r['image']);
     }
     $sqlUpdateField = " image='' ";
 }
 if ($_POST['chkClearImgLarge'] == '') {
     $extlarge = getFileExtention($_FILES['txtImageLarge']['name']);
     if (makeUpload($_FILES['txtImageLarge'], "{$path}/product_category_l{$oldid}{$extlarge}")) {
         @chmod("{$path}/product_category_l{$oldid}{$extlarge}", 0777);
         if ($sqlUpdateField != "") {
             $sqlUpdateField .= ",";
         }
         $sqlUpdateField .= " image_large='{$pathdb}/product_category_l{$oldid}{$extlarge}' ";
     }
 } else {
     if (file_exists('../' . $r['image_large'])) {
         @unlink('../' . $r['image_large']);
     }
     if ($sqlUpdateField != "") {
         $sqlUpdateField .= ",";
     }
     $sqlUpdateField .= " image_large='' ";
 }
开发者ID:ece4u,项目名称:ece4cWeb,代码行数:31,代码来源:product_category_m.php

示例6: chmod

     //$ft_u				=	$path."/.htaccess";
     //$ft_u				=	fopen($ft_u,"w");
     //fwrite($ft_u,$noidunghtaccess);
 } else {
     chmod($path, 0777);
 }
 ///tao thu muc cua nguoi nay===ket thuc
 $ArrImage = array('jpg', 'gif', 'bmp', 'jpeg', 'png');
 $nameImage = removeVietnamese($nameMember, " ", "-");
 //trim(str_replace("-", "",$nameMember));
 //hinh Avatar
 $filenameAvatar = $_FILES['txtImage']['name'];
 $extlargeAvatar = end(explode(".", $filenameAvatar));
 if (array_keys($ArrImage, $extlargeAvatar)) {
     $file_nameInputAvatar = "{$path}/" . $nameImage . time() . "_avatar." . $extlargeAvatar;
     if (makeUpload($_FILES['txtImage'], $file_nameInputAvatar)) {
         @chmod($file_nameInputAvatar, 0404);
         $sqlUpdateField .= " image='" . $file_nameInputAvatar . "' ";
         //xoa file cu
         if ($rowMemberIdInfo['image'] != '') {
             @unlink($rowMemberIdInfo['image']);
         }
     }
 }
 if ($sqlUpdateField != '') {
     $sqlUpdate = "update " . $tableMemberId . " set {$sqlUpdateField} where id='" . $idMember . "'";
     $sqlUpdate1 = "update " . $tableMember . " set {$sqlUpdateField} where id_code='" . $idMember . "'";
     @mysql_query($sqlUpdate, $conn);
     @mysql_query($sqlUpdate1, $conn);
 }
 chmod($path, 0701);
开发者ID:bestwishforyou95,项目名称:congnghemoitruong,代码行数:31,代码来源:homepage.php

示例7: end

     }
 } else {
     if (file_exists('../' . $r['image'])) {
         @unlink('../' . $r['image']);
     }
     $sqlUpdateField = " image='' ";
 }
 // KET THUC THEM HINH image
 //THEM HINH ImgLarge
 if ($_POST['chkClearImgLarge'] == '') {
     $filename = $_FILES['txtImageLarge']['name'];
     $extlarge = end(explode(".", $filename));
     $file_name = removeSpecial(current(explode(".", $filename)), $ojer, $ojers);
     $file_nameInput = "{$path}/" . $nameImage . time() . "_l" . $oldid . "." . $extlarge;
     $file_nameInput1 = "{$pathdb}/" . $nameImage . time() . "_l" . $oldid . "." . $extlarge;
     if (makeUpload($_FILES['txtImageLarge'], $file_nameInput)) {
         @chmod($file_nameInput, 0777);
         if ($sqlUpdateField != "") {
             $sqlUpdateField .= ",";
         }
         $sqlUpdateField .= " image_large='{$file_nameInput1}' ";
         if (file_exists('../' . $r['image_large'])) {
             @unlink('../' . $r['image_large']);
         }
     }
 } else {
     if (file_exists('../' . $r['image_large'])) {
         @unlink('../' . $r['image_large']);
     }
     if ($sqlUpdateField != "") {
         $sqlUpdateField .= ",";
开发者ID:bestwishforyou95,项目名称:congnghemoitruong,代码行数:31,代码来源:advertisement_m_insert.php


注:本文中的makeUpload函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。