當前位置: 首頁>>代碼示例>>PHP>>正文


PHP connect::setdata方法代碼示例

本文整理匯總了PHP中connect::setdata方法的典型用法代碼示例。如果您正苦於以下問題:PHP connect::setdata方法的具體用法?PHP connect::setdata怎麽用?PHP connect::setdata使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在connect的用法示例。


在下文中一共展示了connect::setdata方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: imagesavealpha

         imagesavealpha($frame_overlay, true);
         $user_photo = imagecreatefromjpeg($GLOBALS["the_file"]);
         $profile_image = imagecreatetruecolor(1000, 1000);
         list($width, $height) = getimagesize($GLOBALS["the_file"]);
         imagecopyresized($profile_image, $user_photo, 0, 0, 0, 0, 1000, 1000, $width, $height);
         imagecopymerge($frame, $profile_image, 140, 150, 0, 0, 1000, 1000, 100);
         imagecopy($frame, $frame_overlay, 0, 0, 0, 0, 1200, 1200);
         return $frame;
     }
     $img = LoadPNG('img/' . $frameSelect . '.png');
     imagepng($img, 'img/user/' . $foto . '.png');
     imagedestroy($img);
     include "dbcrud.php";
     $db = new connect();
     $db->connect_it("yoletsgo");
     $db->setdata("INSERT INTO `user_table` (`id`, `name`, `partner_name`, `age`, `email_address`, `phone_number`, `address`, `city`, `country`, `favourite_sport`, `reason`, `pic_name`) VALUES (NULL, '{$name}', '{$partnerName}', '{$age}', '{$emailAddress}', '{$phoneNumber}', '{$address}', '{$city}', '{$country}', '{$favouriteSport}', '{$reason}', '{$foto}');");
 }
 switch ($step) {
     case 1:
         $pages = "register.php";
         break;
     case 2:
         $pages = "upload.php";
         break;
     case 3:
         $pages = "done.php";
         break;
     default:
         $pages = false;
         break;
 }
開發者ID:egarana,項目名稱:yoletsgo,代碼行數:31,代碼來源:index.php

示例2: LoadPNG

	imagecopy($frame, $frame_overlay, 0, 0, 0, 0, 1200, 1200);

    return $frame;
}

header('Content-Type: image/png');

$img = LoadPNG('img/frame-1.png');

imagepng($img, 'img/user/user.png');
imagedestroy($img);*/
include "dbcrud.php";
$db = new connect();
$db->connect_it("yoletsgo");
for ($i = 101; $i < 200; $i++) {
    $db->setdata("INSERT INTO `yoletsgo`.`user_table` (`id`, `name`, `partner_name`, `age`, `email_address`, `phone_number`, `address`, `city`, `country`, `favourite_sport`, `reason`, `pic_name`) VALUES (NULL, 'User {$i}', 'User {$i} Partner', '24', 'user{$i}@test.com', '081234567891{$i}', 'User {$i} Address', 'User {$i} City', 'Unknown', 'Mini Soccer', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam qu', '5670eaay0wqpp_700b.jpg')");
}
/*include "dbcrud.php";

$db = new connect();

$db->connect_it("yoletsgo");

$user_data = array(
            'users' => array(
                        
                    )
        );

$db->getdata("SELECT * FROM `user_table` ORDER BY `id` DESC");
開發者ID:egarana,項目名稱:yoletsgo,代碼行數:30,代碼來源:images.php


注:本文中的connect::setdata方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。