php 支付宝接口程序源码(完整版带实例)

 更新时间:2016年11月25日 16:27  点击:1275
现在流行的网站支持平台,支付宝当仁不让的老大了,现在我们就来告诉你如何使用支付宝api来做第三方支付,把支付宝放到自己网站来哈。
 代码如下 复制代码

*/
//alipay_config.php 配置程序
$interfaceurl = "https://www.alipay.com/payto:";
$sitename  = "网站名称";
$weburl   = "http://网站网址";
$o_fee   = "0.00";              //平邮费
$e_fee   = "0.00";              //快递费
$selleremail  = "";//支付宝账号
$payalikey  = "";//安全校验码
$imgurl   = "pay.gif"; //按钮图片源
$imgtitle  = "使用支付宝购买";           //按钮图片说明
?>
<?php
/*********************************************************************
 filename: alipay.php
 author:  dboyzhang
 version:  ver 2.0.0 beta1
 contact_me: wangwang:dboyzhang
*********************************************************************/

//alipay.php代码
require_once("alipay_config.php");
class alipay
{
 function geturl($s1,$s2,$s3,$s4,$s5,$s6,$s7,$s8,$s9,$s10,$s11,$s12,$s13,$s14,$s15,$s16,$s17,$s18,$s19,$s20,$s21,$s22,$s23)
 {
  $parameter = array(
    'cmd'   => $s1,
    'subject'  => $s2,
    'body'   => $s3,
    'order_no'  => $s4,
    'price'   => $s5,
    'url'   => $s6,
    'type'   => $s7,
    'number'  => $s8,
    'transport'  => $s9,
    'ordinary_fee'  => $s10,
    'express_fee'  => $s11,
    'readonly'  => $s12,
    'buyer_msg'  => $s13,
    'seller'  => $s14,
    'buyer'   => $s15,
    'buyer_name'  => $s16,
    'buyer_address'  => $s17,
    'buyer_zipcode'  => $s18,
    'buyer_tel'  => $s19,
    'buyer_mobile'  => $s20,
    'partner'  => $s21,
  );

  $url = $s22.$s14."?";
  foreach($parameter as $key => $value){
    if($value){
      $url  .= $key."=".urlencode($value)."&";
      $acsouce .=$key.$value;
    }
  }
  $url  .= 'ac='.md5($acsouce.$s23);
  return $url;

 }
}
?>

pay.php页面

<?
error_reporting(0);
$aliname=$_post["aliname"];
$alizipcode=$_post["alizipcode"];
$aliphone=$_post["aliphone"];
$aliaddress=$_post["aliaddress"];
$aliorder=$_post["aliorder"];
$alimailtype=$_post["alimailtype"];
$alimoney=$_post["alimoney"];
$alimob=$_post["alimob"];
$alibody=$_post["alibody"];
?>
<?
require_once("alipay_config.php");
require_once("alipay.php");


$cmd   = '0001';
$subject  = "订单号:".$aliorder;
$body   = '商品介绍';
$order_no  = $aliorder;
$price   = $alimoney;
$url   = 'www.111cn.net';//你的网址
$type   = '1';
$number   =  '1';
$transport  = $alimailtype;
$ordinary_fee  = '0.00';
$express_fee  = '0.00';
$readonly  = 'true';
$buyer_msg  = $alibody;
$seller   = $selleremail;
$buyer   = '';
$buyer_name  = $aliname;
$buyer_address  = $aliaddress;
$buyer_zipcode  = $alizipcode;
$buyer_tel  = $aliphone;
$buyer_mobile  = $alimob;
$partner  = '2088002008096997';

$geturl = new alipay;
$link = $geturl->geturl
 (
 $cmd,$subject,$body,$order_no,$price,$url,$type,$number,$transport,
 $ordinary_fee,$express_fee,$readonly,$buyer_msg,$seller,$buyer,
 $buyer_name,$buyer_address,$buyer_zipcode,$buyer_tel,$buyer_mobile,$partner,
 $interfaceurl,$payalikey
 );
?>
<html>
<head>
<title>简易支付宝付款php版</title>
<link href="admin_style.css教程" rel=stylesheet>
<meta http-equiv=content-type content="text/html; charset=gb2312">
</head>

<body>
<table class=border id=table1 style="font-size: 9pt" height=185 cellspacing=0
cellpadding=0 width=492 align=center border=0>
  <tbody>
  <tr>
    <td class=topbg height=30>
      <div align=center><strong>简易支付宝付款php版</strong></div></td></tr>
  <tr>
    <td style="border-left: #e4e4e4 1px solid; border-bottom: #e4e4e4 1px solid" colspan=3 height=150>
      <table style="font-size: 9pt" height=137 width="100%" align=center bgcolor=#ffffff>
        <tbody>
        <tr class=tdbg>
          <td width="14%">订单号码:</td>
          <td width="86%"><? echo $aliorder; ?></td></tr>
        <tr class=tdbg>
          <td width="14%">收 货 人:</td>
          <td width="86%"><? echo $aliname; ?></td></tr>
        <tr class=tdbg>
          <td width="14%">付款金额:</td>
          <td width="86%"><b><? echo $alimoney; ?></b></td></tr>
        <tr class=tdbg>
          <td width="14%">收货地址:</td>
          <td width="86%"><? echo $aliaddress; ?></td></tr>
        <tr class=tdbg>
          <td>物流方式:</td>
          <td><? echo $alimailtype; ?> (1.平邮 2.快递 3.虚拟物品)</td></tr>
        <tr class=tdbg>
          <td>联系电话:</td>
          <td><? echo $aliphone; ?></td></tr>
        <tr class=tdbg>
          <td>邮政编码:</td>
          <td><? echo $alizipcode; ?></td></tr>
        <tr class=tdbg>
          <td>手机号码:</td>
          <td><? echo $alimob; ?></td></tr>
        <tr class=tdbg>
          <td>客户留言:</td>
          <td><? echo $alibody; ?></td></tr>
        <tr class=tdbg>
          <td></td>
          <td><input type="button" name="submit21" onclick="网页特效:history.go(-1)" value="返回修改订单">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="<?php echo $link?>" target="_blank"><img src="<?php echo $imgurl?>" alt="<?php echo $imgtitle?>" border="0" align='absmiddle' border='0'/></a> </td></tr></tbody></table></td></tr></tbody></table>
 
</body></html>

 

本文章是一款图片上传代码,他可以把上传到服务器的图片在进行预览修改,如果是你想的你就可以保存了,不是可以删除再重新上传哦。

if(!isset($_session))session_start();

/**2010-6-22
 * $data 数组类型    包含以下变量
 -------------------------------
 * $sub_type        submit类型(upload:上传按钮    delete:删除按钮),默认upload
 * $file            通过表单获取的$_files['filename']数组
 * $img_tag_id        预览图片的<img>的id值
 * $img_dir            上传图片的目录
 * $max_file_size    单位m(兆),默认:1m
 * $type_array        允许的上传的图片类型(默认:image/pjpeg、image/jpeg、image/gif)
 **/
function upload($data){
    if(!$data['file']){
        echo '<script>alert("file不能为空!");</script>';exit;
    }
    if(!$data['img_tag_id']){
        echo '<script>alert("预览图片标签id不能为空!");</script>';exit;
    }
    if(!$data['img_dir']){
        echo '<script>alert("图片上传目录不能为空!");</script>';exit;
    }
    if(!isset($data['max_file_size'])){
        $data['max_file_size'] = 1024 * 1024;
    }else{
        $data['max_file_size'] = $data['max_file_size'] * 1024 * 1024;
    }
    if(!isset($data['type_array'])){
        $data['type_array'] = array('image/pjpeg', 'image/jpeg', 'image/gif');
    }
    if(!isset($data['sub_type'])){
        $data['sub_type'] = 'upload';
    }

    $imgpath = '';
    if(isset($data['sub_type']) && $data['sub_type'] == 'delete'){
        if(isset($_session['name']) && $_session['name']){
            if(is_file($_session['imgpath'])){
                $b = unlink($_session['imgpath']);
            }
            unset($_session['name'], $_session['imgpath']);
            if(!isset($_session['name'])){
                echo '<script>alert("删除成功!");</script>';
                echo '<script>parent.document.getelementbyid("'.$data['img_tag_id'].'").style.display = "none";</script>';
            }else{
                echo '<script>alert("删除失败!");</script>';
            }
        }else{
            echo '<script>alert("没有稿件!");</script>';
        }exit;
    }

    if(isset($_session['imgpath']) && $_session['imgpath']){
        echo '<script>alert("稿件已经存在,要想重新上传请删除原来的稿件!");</script>';exit;
    }
    if(!in_array($data['file']['type'], $data['type_array'])){
        echo '<script>alert("稿件类型不匹配,请上传.jpg、.gif和.png格式的图片!");</script>';exit;
    }
    if($data['file']['size'] > $data['max_file_size']){
        echo '<script>alert("您上传的稿件过大,请选择2m以下的图片上传!");</script>';exit;
    }

    if(!is_dir($data['img_dir'])){
        @mkdir($data['img_dir'], 0777, true);
    }
    $imgpath    = $data['img_dir'].'/'.date('his', time()).rand(100, 999).$data['file']['name'];
    $isupload    = move_uploaded_file($data['file']['tmp_name'], $imgpath);
    if(!$isupload){
        echo '<script>alert("稿件上传失败,请尝试重新上传!");</script>';exit;
    }else{
        echo '<script>alert("稿件上传成功!");</script>';
    }
    $_session['name']        = $data['file']['name'];
    $_session['imgpath']    = $imgpath;

    return $imgpath;
}

/*test_start*/
$sub_type = '';
if(isset($_post['submit_upload']))$sub_type = 'upload';
if(isset($_post['submit_delete']))$sub_type = 'delete';
if($sub_type){//echo '<script>alert("'.$sub_type.'");</script>';exit;
    $data = array(    'sub_type'        => $sub_type,
                    'file'            => $_files['file'],
                    'img_tag_id'    => 'picview',
                    'img_dir'        => 'upload_img',
                  );
    $imgpath = upload($data);
}else{
    $imgpath = isset($_session['imgpath'])? $_session['imgpath']: '';
}
?>

<form action="ad.php" method="post" enctype="multipart/form-data" target="frame">
    <input type="file" name="file" class="input">
    <input type="submit" name="submit_upload" value="上  传">
    <input type="submit" name="submit_delete" value="删  除">
    <iframe id="frame" name="frame" width="0" height="0" marginwidth="0" frameborder="0" src="about:blank"></iframe>
</form>

<img id="picview" height="100" style="display:none;">

<script>
if("<?php echo $imgpath; ?>"){
    parent.document.getelementbyid("picview").src = "<?php echo $imgpath; ?>";
    parent.document.getelementbyid("picview").style.display = "block";
}
</script>

php 购物车是在电子商务网站会用到的,一种像超市购物车一样的,选好商品了,先放到自己的购物车里面等好了再到柜台结算,本款php购物车完全按照这个原理来实例的,下面我们来看看吧,利用了cookie来实现。
 代码如下 复制代码

<?php
/**
 * 购物车类 cookies 保存,保存周期为1天 注意:浏览器必须支持cookie才能够使用
 * 技术交流群:100352308
 */
class cartapi {
 private $cartarray = array(); // 存放购物车的二维数组
 private $cartcount; // 统计购物车数量
 public $expires = 86400; // cookies过期时间,如果为0则不保存到本地 单位为秒
 /**
  * 构造函数 初始化操作 如果$id不为空,则直接添加到购物车
  *
  */
 public function __construct($id = "",$name = "",$price1 = "",$price2 = "",$price3 = "",$count = "",$image = "",$expires = 86400) {
  if ($id != "" && is_numeric($id)) {
   $this->expires = $expires;
   $this->addcart($id,$name,$price1,$price2,$price3,$count,$image);
  }
 }
 /**
  * 添加商品到购物车
  *
  * @param int $id 商品的编号
  * @param string $name 商品名称
  * @param decimal $price1 商品价格
  * @param decimal $price2 商品价格
  * @param decimal $price3 商品价格
  * @param int $count 商品数量
  * @param string $image 商品图片
  * @return 如果商品存在,则在原来的数量上加1,并返回false
  */
 public function addcart($id,$name,$price1,$price2,$price3,$count,$image) {
  $this->cartarray = $this->cartview(); // 把数据读取并写入数组
  if ($this->checkitem($id)) { // 检测商品是否存在
   $this->modifycart($id,$count,0); // 商品数量加$count
   return false;
  }
  $this->cartarray[0][$id] = $id;
  $this->cartarray[1][$id] = $name;
  $this->cartarray[2][$id] = $price1;
  $this->cartarray[3][$id] = $price2;
  $this->cartarray[4][$id] = $price3;
  $this->cartarray[5][$id] = $count;
  $this->cartarray[6][$id] = $image;
  $this->save();
 }
 /**
  * 修改购物车里的商品
  *
  * @param int $id 商品编号
  * @param int $count 商品数量
  * @param int $flag 修改类型 0:加 1:减 2:修改 3:清空
  * @return 如果修改失败,则返回false
  */
 public function modifycart($id, $count, $flag = "") {
  $tmpid = $id;
  $this->cartarray = $this->cartview(); // 把数据读取并写入数组
  $tmparray = &$this->cartarray;  // 引用
  if (!is_array($tmparray[0])) return false;
  if ($id < 1) {
   return false;
  }
  foreach ($tmparray[0] as $item) {
   if ($item === $tmpid) {
    switch ($flag) {
     case 0: // 添加数量 一般$count为1
      $tmparray[5][$id] += $count;
      break;
     case 1: // 减少数量
      $tmparray[5][$id] -= $count;
      break;
     case 2: // 修改数量
      if ($count == 0) {
       unset($tmparray[0][$id]);
       unset($tmparray[1][$id]);
       unset($tmparray[2][$id]);
       unset($tmparray[3][$id]);
       unset($tmparray[4][$id]);
       unset($tmparray[5][$id]);
       unset($tmparray[6][$id]);
       break;
      } else {
       $tmparray[5][$id] = $count;
       break;
      }
     case 3: // 清空商品
      unset($tmparray[0][$id]);
      unset($tmparray[1][$id]);
      unset($tmparray[2][$id]);
      unset($tmparray[3][$id]);
      unset($tmparray[4][$id]);
      unset($tmparray[5][$id]);
      unset($tmparray[6][$id]);
      break;
     default:
      break;
    }
   }
  }
  $this->save();
 }
 /**
  * 清空购物车
  *
  */
 public function removeall() {
  $this->cartarray = array();
  $this->save();
 }
 /**
  * 查看购物车信息
  *
  * @return array 返回一个二维数组
  */
 public function cartview() {
  $cookie = strips教程lashes($_cookie['cartapi']);
  if (!$cookie) return false;
  $tmpunserialize = unserialize($cookie);
  return $tmpunserialize;
 }
 /**
  * 检查购物车是否有商品
  *
  * @return bool 如果有商品,返回true,否则false
  */
 public function checkcart() {
  $tmparray = $this->cartview();
  if (count($tmparray[0]) < 1) {   
   return false;
  }
  return true;
 }
 /**
  * 商品统计
  *
  * @return array 返回一个一维数组 $arr[0]:产品1的总价格 $arr[1:产品2得总价格 $arr[2]:产品3的总价格 $arr[3]:产品的总数量
  */
 public function countprice() {
  $tmparray = $this->cartarray = $this->cartview();
  $outarray = array(); //一维数组
  // 0 是产品1的总价格
  // 1 是产品2的总价格
  // 2 是产品3的总价格
  // 3 是产品的总数量
  $i = 0;
  if (is_array($tmparray[0])) {
   foreach ($tmparray[0] as $key=>$val) {
    $outarray[0] += $tmparray[2][$key] * $tmparray[5][$key];
    $outarray[1] += $tmparray[3][$key] * $tmparray[5][$key];
    $outarray[2] += $tmparray[4][$key] * $tmparray[5][$key];
    $outarray[3] += $tmparray[5][$key];
    $i++;
   }
  }
  return $outarray;
 }
 /**
  * 统计商品数量
  *
  * @return int
  */
 public function cartcount() {
  $tmparray = $this->cartview();
  $tmpcount = count($tmparray[0]);
  $this->cartcount = $tmpcount;
  return $tmpcount;
 }
 /**
  * 保存商品 如果不使用构造方法,此方法必须使用
  *
  */
 public function save() {
  $tmparray = $this->cartarray;
  $tmpserialize = serialize($tmparray);
  setcookie("cartapi",$tmpserialize,time()+$this->expires);
 }
 /**
  * 检查购物车商品是否存在
  *
  * @param int $id
  * @return bool 如果存在 true 否则false
  */
 private function checkitem($id) {
  $tmparray = $this->cartarray;
  if (!is_array($tmparray[0])) return;
  foreach ($tmparray[0] as $item) {
   if ($item === $id) return true;
  }
  return false;
 }
}
?>

提供一款超完美的php文件在线压缩程序,原理很简单就是把文件以二进制形式保存了,以前用过利用rar的内核程序,这是php自带的压缩功能。
 代码如下 复制代码

set_time_limit(0);
class phpzip{

    var $file_count = 0 ;
    var $datastr_len   = 0;
    var $dirstr_len = 0;
    var $filedata = ''; //该变量只被类外部程序访问
    var $gzfilename;
    var $fp;
    var $dirstr='';

    /*
    返回文件的修改时间格式.
    只为本类内部函数调用.
    */
    function unix2dostime($unixtime = 0) {
        $timearray = ($unixtime == 0) ? getdate() : getdate($unixtime);

        if ($timearray['year'] < 1980) {
        $timearray['year']    = 1980;
        $timearray['mon']     = 1;
        $timearray['mday']    = 1;
        $timearray['hours']   = 0;
        $timearray['minutes'] = 0;
        $timearray['seconds'] = 0;
        }

        return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) |
               ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1);
    }
    /*
    初始化文件,建立文件目录,
    并返回文件的写入权限.
    */
    function startfile($path = 'faisun.zip'){
       $this->gzfilename=$path;
       $mypathdir=array();
       do{
        $mypathdir[] = $path = dirname($path);
       }while($path != '.');
       @end($mypathdir);
       do{
        $path = @current($mypathdir);
        @mkdir($path);
       }while(@prev($mypathdir));

       if($this->fp=@fopen($this->gzfilename,"w")){
        return true;
       }
       return false;
    }
    /*
    添加一个文件到 zip 压缩包中.
    */
   

 

<?php教程
/**
 * gd image mask
 *
 * @copyright ugia.cn

 */
function imagemask(&$im, $x1, $y1, $x2, $y2, $deep)
{
    for($x = $x1; $x < $x2; $x += $deep)
    {
        for ($y = $y1; $y < $y2; $y += $deep)
        {
            $color = imagecolorat ($im, $x + round($deep / 2), $y + round($deep / 2));
            imagefilledrectangle ($im, $x, $y, $x + $deep, $y + $deep, $color);
        }
    }
}
?>


  示例:
<?php
header("content-type: image/png");
$im = imagecreatefromjpeg("test.jpg");
imagemask($im, 57, 22, 103, 40, 8);
imagepng($im);
imagedestroy($im);
?>

 


<?php
/**
 * gd image text outer
 *
 * @copyright ugia.cn

 */
function imagetextouter(&$im, $size, $x, $y, $color, $fontfile, $text, $outer)
{
    if (!function_exists('imagecolorallocatehex'))
    {
        function imagecolorallocatehex($im, $s)
        {
           if($s{0} == "#") $s = substr($s,1);
           $bg_dec = hexdec($s);
           return imagecolorallocate($im,
                       ($bg_dec & 0xff0000) >> 16,
                       ($bg_dec & 0x00ff00) >>  8,
                       ($bg_dec & 0x0000ff)
                       );
        }
    }
    $ttf = false;
    if (is_file($fontfile))
    {
        $ttf = true;
        $area = imagettfbbox($size, $angle, $fontfile, $text);
        $width  = $area[2] - $area[0] + 2;
        $height = $area[1] - $area[5] + 2;
    }
    else
    {
        $width  = strlen($text) * 10;
        $height = 16;
    }
    $im_tmp = imagecreate($width, $height);
    $white = imagecolorallocate($im_tmp, 255, 255, 255);
    $black = imagecolorallocate($im_tmp, 0, 0, 0);
    $color = imagecolorallocatehex($im, $color);
    $outer = imagecolorallocatehex($im, $outer);
    if ($ttf)
    {
        imagettftext($im_tmp, $size, 0, 0, $height - 2, $black, $fontfile, $text);
        imagettftext($im, $size, 0, $x, $y, $color, $fontfile, $text);
        $y = $y - $height + 2;
    }
    else
    {
        imagestring($im_tmp, $size, 0, 0, $text, $black);
        imagestring($im, $size, $x, $y, $text, $color);
    }
    for ($i = 0; $i < $width; $i ++)
    {
        for ($j = 0; $j < $height; $j ++)
        {
            $c = imagecolorat($im_tmp, $i, $j);
            if ($c !== $white)
            {
                imagecolorat ($im_tmp, $i, $j - 1) != $white || imagesetpixel($im, $x + $i, $y + $j - 1, $outer);
                imagecolorat ($im_tmp, $i, $j + 1) != $white || imagesetpixel($im, $x + $i, $y + $j + 1, $outer);
                imagecolorat ($im_tmp, $i - 1, $j) != $white || imagesetpixel($im, $x + $i - 1, $y + $j, $outer);
                imagecolorat ($im_tmp, $i + 1, $j) != $white || imagesetpixel($im, $x + $i + 1, $y + $j, $outer);
                // 取消注释,与fireworks的发光效果相同
                /*
                imagecolorat ($im_tmp, $i - 1, $j - 1) != $white || imagesetpixel($im, $x + $i - 1, $y + $j - 1, $outer);
                imagecolorat ($im_tmp, $i + 1, $j - 1) != $white || imagesetpixel($im, $x + $i + 1, $y + $j - 1, $outer);
                imagecolorat ($im_tmp, $i - 1, $j + 1) != $white || imagesetpixel($im, $x + $i - 1, $y + $j + 1, $outer);
                imagecolorat ($im_tmp, $i + 1, $j + 1) != $white || imagesetpixel($im, $x + $i + 1, $y + $j + 1, $outer);
                */
            }
        }
    }
    imagedestroy($im_tmp);
}
?>


  示例:
<?php
header("content-type: image/png");
$im = imagecreatefromjpeg("bluesky.jpg");
$white = imagecolorallocate($im, 255,255,255);
imagetextouter($im, 9, 10, 20, '#000000', "simsun.ttc", '新年快乐', '#ffffff');
imagetextouter($im, 2, 10, 30, '#ffff00', "", 'hello, world!' , '#103993');
imagepng($im);
imagedestroy($im);
?>


  马赛克:void imagemask ( resource image, int x1, int y1, int x2, int y2, int deep)

  imagemask() 把坐标 x1,y1 到 x2,y2(图像左上角为 0, 0)的矩形区域加上马赛克。

  deep为模糊程度,数字越大越模糊。
描边:void imagetextouter ( resource image, int size, int x, int y, string color, string fontfile, string text, string outercolor)

  imagetextouter() 将字符串 text 画到 image 所代表的图像上,从坐标 x,y(左上角为 0, 0)开始,颜色为 color,边框所使用的颜色为 outercolor,使用 fontfile 所指定的 truetype 字体文件。

  如果不指定字体文件,则使用gd的内部字体。根据 php 所使用的 gd 库的不同,如果 fontfile 没有以 ‘/’开头,则 ‘.ttf’ 将被加到文件名之后并且会搜索库定义字体路径。

  如果指定了字体文件,由 x,y 所表示的坐标定义了第一个字符的基本点(大概是字符的左下角)。否则 x,y 定义了第一个字符的右上角。

  fontfile 是想要使用的 truetype 字体的文件名。

  text 是文本字符串,可以包含 utf-8 字符序列(形式为:{)来访问字体中超过前 255 个的字符。

  color 是十六进制的#rrggbb格式的颜色,如#ff0000为红色。

  outercolor 描边颜色,十六进制的#rrggbb格式。

[!--infotagslink--]

相关文章

  • 源码分析系列之json_encode()如何转化一个对象

    这篇文章主要介绍了源码分析系列之json_encode()如何转化一个对象,对json_encode()感兴趣的同学,可以参考下...2021-04-22
  • jQuery 2.0.3 源码分析之core(一)整体架构

    拜读一个开源框架,最想学到的就是设计的思想和实现的技巧。废话不多说,jquery这么多年了分析都写烂了,老早以前就拜读过,不过这几年都是做移动端,一直御用zepto, 最近抽出点时间把jquery又给扫一遍我也不会照本宣科的翻译...2014-05-31
  • 基于C#实现微信支付宝扫码支付功能

    为公司系统业务需要,这几天了解了一下微信和支付宝扫码支付的接口,并用c#实现了微信和支付宝扫码支付的功能。需要的朋友跟随小编一起看看吧...2020-06-25
  • JavaScript仿支付宝密码输入框

    那么今天我就用JavaScript代码来实现这个效果吧,那么首先介绍一下整个的思路,首先我们先将确定输入密码的位数,我的需求是5位,那么就用一个div标签包住5个input标签...2016-01-02
  • vue3源码剖析之简单实现方法

    源码的重要性相信不用再多说什么了吧,特别是用Vue 框架的,一般在面试的时候面试官多多少少都会考察源码层面的内容,下面这篇文章主要给大家介绍了关于vue3源码剖析之简单实现的相关资料,需要的朋友可以参考下...2021-09-07
  • 快速理解MySQL中主键与外键的实例教程

    主键与外键的关系,通俗点儿讲,我现在有一个论坛,有两张表,一张是主贴 thread,一张是回帖 reply先说说主键,主键是表里面唯一识别记录的字段,一般是帖子id,体现在访问的时候,例如是 thread.php&#63;id=1 表示我要访问的是帖子...2015-11-24
  • c# 接口使用实例

    这篇文章主要介绍了c#接口使用的实例,文中讲解非常细致,代码帮助大家更好的理解和学习,感兴趣的朋友可以了解下...2020-07-17
  • yii添删改查实例

    一、数据访问对象 (DAO)YiiDAO 基于 PHP Data Objects (PDO) 构建。它是一个为众多流行的DBMS提供统一数据访问的扩展,这些 DBMS 包括MySQL, PostgreSQL 等等。因此,要使用 Yii DAO,PDO 扩展和特定的 PDO 数据库驱动(例如...2015-11-24
  • Underscore源码分析

    Underscore 是一个 JavaScript 工具库,它提供了一整套函数式编程的实用功能,但是没有扩展任何 JavaScript 内置对象。这篇文章主要介绍了underscore源码分析相关知识,感兴趣的朋友一起学习吧...2016-01-02
  • Ecshop 支付宝手机网页支付免费版

    Ecshop手机网页版本支持在网上找了很多需要花钱购买了,在这里小编整理了一个Ecshop 支付宝手机网页支付免费版供大家参考。 Ecshop 支付宝手机网页支付,针对ecshop...2016-11-25
  • C#中的IEnumerable简介及简单实现实例

    这篇文章主要介绍了C#中的IEnumerable简介及简单实现实例,本文讲解了IEnumerable一些知识并给出了一个简单的实现,需要的朋友可以参考下...2020-06-25
  • js canvas仿支付宝芝麻信用分仪表盘

    这篇文章主要为大家详细介绍了js canvas仿支付宝芝麻信用分仪表盘,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...2016-11-22
  • Android Studio如何查看源码并调试的方法步骤

    这篇文章主要介绍了Android Studio如何查看源码并调试的方法步骤,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2020-05-15
  • 支付宝小程序实现省市区三级联动

    这篇文章主要为大家详细介绍了支付宝小程序实现省市区三级联动,文中示例代码介绍的非常详细,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...2020-06-21
  • php socket讲解与实例

    在这一章里你将了解到迷人而又让人容易糊涂的套接字(Sockets)。Sockets在PHP中是没有充分利用的功能。今天你将看到产生一个能使用客户端连接的服务器,并在客户端使用sock...2016-11-25
  • C++内核对象封装单实例启动程序的类

    这篇文章主要介绍了利用C++内核对象封装的类,程序只能运行单个实例,可防止多次启动,大家参考使用吧...2020-04-25
  • php 中缓冲输出实例代码

    ob_start([string output_callback])- 打开输出缓冲区   所有的输出信息不在直接发送到浏览器,而是保存在输出缓冲区里面,可选得回调函数用于处理输出结果信息。 ob...2016-11-25
  • ASP.NET使用HttpWebRequest读取远程网页源代码

    本文分享了一个使用HttpWebRequest读取远程网页的案例,供大家参考学习。...2021-09-22
  • 用C#获取硬盘序列号,CPU序列号,网卡MAC地址的源码

    privatestring[]GetMoc() { string[]str=newstring[3]; ManagementClassmcCpu=newManagementClass("win32_Processor"); ManagementObjectCollectionmocCpu=mcCpu.GetInstan...2020-06-25
  • Vue实例简单方法介绍

    这篇文章主要为大家详细介绍了Vue实例的一些简单方法,具有一定的参考价值,感兴趣的小伙伴们可以参考一下...2017-01-23