Home Backend Development PHP Tutorial php WeChat public account sends red envelopes

php WeChat public account sends red envelopes

Jul 29, 2016 am 09:11 AM
gt private share this

The development framework is we7

Required parameters: appid, appSecret, MchId, API key

<?<span>php
</span><span>/*</span><span>*
 * 微信红包的类 
 * 
 </span><span>*/</span><span>CLASS</span><span> WXHongBao {
    
    </span><span>private</span><span>$mch_id</span> = "111111";<span>//</span><span>商户ID写死</span><span>private</span><span>$wxappid</span> = "22222222";<span>//</span><span>微信公众号,写死</span><span>private</span><span>$client_ip</span> = "119.29.80.114"; <span>//</span><span>调用红包接口的主机的IP,服务端IP,写死,即脚本文件所在的IP</span><span>private</span><span>$apikey</span> = "33333333";<span>//</span><span>pay的秘钥值</span><span>private</span><span>$total_num</span> = 1;<span>//</span><span>发放人数。固定值1,不可修改    </span><span>private</span><span>$nick_name</span> = "微信产品中心公众号"; <span>//</span><span>红包商户名称</span><span>private</span><span>$send_name</span> = "微信产品中心公众号";<span>//</span><span>红包派发者名称</span><span>private</span><span>$wishing</span> = "祝福语"; <span>//</span><span>private</span><span>$act_name</span> = "红包活动"; <span>//</span><span>活动名称</span><span>private</span><span>$remark</span> = "活动备注"<span>;
    </span><span>private</span><span>$nonce_str</span> = ""<span>;
    </span><span>private</span><span>$mch_billno</span> = ""<span>;
    </span><span>private</span><span>$re_openid</span> = "";<span>//</span><span>接收方的openID    </span><span>private</span><span>$total_amount</span> = 1 ;<span>//</span><span>红包金额,单位 分</span><span>private</span><span>$min_value</span> = 1;<span>//</span><span>最小金额</span><span>private</span><span>$max_value</span> = 1; <span>//</span><span>根据接口要求,上述3值必须一致             </span><span>private</span><span>$sign</span> = ""; <span>//</span><span>签名在send时生成    </span><span>private</span><span>$amt_type</span>; <span>//</span><span>分裂红包参数,在sendgroup中进行定义,是常量 ALL_RAND 
    
    //证书,在构造函数中定义,注意!</span><span>private</span><span>$apiclient_cert</span>; <span>//</span><span>= getcwd()."/apiclient_cert.pem";</span><span>private</span><span>$apiclient_key</span>;<span>//</span><span> = getcwd()."/apiclient_key.pem";
    
    //分享参数</span><span>private</span><span>$isShare</span> = <span>false</span>; <span>//</span><span>有用?似乎是无用参数,全部都不是必选和互相依赖的参数</span><span>private</span><span>$share_content</span> = ""<span>; 
    </span><span>private</span><span>$share_url</span> =""<span>;
    </span><span>private</span><span>$share_imgurl</span> = ""<span>;
    
    </span><span>private</span><span>$wxhb_inited</span><span>;
    
    </span><span>private</span><span>$api_hb_group</span> = "https://api.mch.weixin.qq.com/mmpaymkttransfers/sendgroupredpack";<span>//</span><span>裂变红包</span><span>private</span><span>$api_hb_single</span> = "https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack"<span>;
    
    </span><span>private</span><span>$error</span> = "ok"; <span>//</span><span>init</span><span>/*</span><span>*
     * WXHongBao::__construct()
     * 步骤
     * new(openid,amount)
     * setnickname
     * setsend_name
     * setwishing
     * setact_name
     * setremark
     * send()
     * @return void
     </span><span>*/</span><span>function</span><span> __construct(){
        </span><span>//</span><span>好像没有什么需要构造函数做的</span><span>$this</span>->wxhb_inited = <span>false</span><span>; 
        </span><span>$this</span>->apiclient_cert = <span>getcwd</span>()."/apiclient_cert.pem"<span>;
        </span><span>$this</span>->apiclient_key = <span>getcwd</span>()."/apiclient_key.pem"<span>;
    }
    
    </span><span>public</span><span>function</span><span> err(){
        </span><span>return</span><span>$this</span>-><span>error;
    } 
    </span><span>public</span><span>function</span><span> error(){
        </span><span>return</span><span>$this</span>-><span>err();
    }
    </span><span>/*</span><span>*
     * WXHongBao::newhb()
     * 构造新红包 
     * @param mixed $toOpenId
     * @param mixed $amount 金额分
     * @return void
     </span><span>*/</span><span>public</span><span>function</span> newhb(<span>$toOpenId</span>,<span>$amount</span><span>){
         
        </span><span>if</span>(!<span>is_numeric</span>(<span>$amount</span><span>)){
            </span><span>$this</span>->error = "金额参数错误"<span>;
            </span><span>return</span><span>;
        }</span><span>elseif</span>(<span>$amount</span><100<span>){
            </span><span>$this</span>->error = "金额太小"<span>;
            </span><span>return</span><span>;
        }</span><span>elseif</span>(<span>$amount</span>>20000<span>){
            </span><span>$this</span>->error = "金额太大"<span>;
            </span><span>return</span><span>;
        }
       
        </span><span>$this</span>->gen_nonce_str();<span>//</span><span>构造随机字串</span><span>$this</span>->gen_mch_billno();<span>//</span><span>构造订单号</span><span>$this</span>->setOpenId(<span>$toOpenId</span><span>);
        </span><span>$this</span>->setAmount(<span>$amount</span><span>);
        </span><span>$this</span>->wxhb_inited = <span>true</span>; <span>//</span><span>标记微信红包已经初始化完毕可以发送
        
        //每次new 都要将分享的内容给清空掉,否则会出现残余被引用</span><span>$this</span>->share_c>;
        <span>$this</span>->share_imgurl = ""<span>;
        </span><span>$this</span>->share_url = ""<span>;
    }
    
    </span><span>/*</span><span>*
     * WXHongBao::send()
     * 发出红包
     * 构造签名
     * 注意第二参数,单发时不要改动!
     * @return boolean $success
     </span><span>*/</span><span>public</span><span>function</span> send(<span>$url</span> = "https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack",<span>$total_num</span> = 1<span>){
    
        </span><span>if</span>(!<span>$this</span>-><span>wxhb_inited){
            </span><span>$this</span>->error .= "(红包未准备好)"<span>;
            </span><span>return</span><span>false</span>; <span>//</span><span>未初始化完成</span><span>        }
        
        </span><span>$this</span>->total_num = <span>$total_num</span><span>;
        
        </span><span>$this</span>->gen_Sign(); <span>//</span><span>生成签名
        
        //构造提交的数据        </span><span>$xml</span> = <span>$this</span>-><span>genXMLParam();
        
        
        </span><span>//</span><span>debug</span><span>file_put_contents</span>("hbxml.txt",<span>$xml</span><span>);
        
        </span><span>//</span><span>提交xml,curl
        //$url = "https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack";</span><span>$ch</span> =<span> curl_init();        
        curl_setopt(</span><span>$ch</span>,CURLOPT_TIMEOUT,10<span>);
        curl_setopt(</span><span>$ch</span>,CURLOPT_RETURNTRANSFER, 1<span>);        
        curl_setopt(</span><span>$ch</span>,CURLOPT_URL,<span>$url</span><span>);
        curl_setopt(</span><span>$ch</span>,CURLOPT_SSL_VERIFYPEER,<span>false</span><span>);
        curl_setopt(</span><span>$ch</span>,CURLOPT_SSL_VERIFYHOST,<span>false</span><span>);
        
        curl_setopt(</span><span>$ch</span>,CURLOPT_SSLCERTTYPE,'PEM'<span>);
        curl_setopt(</span><span>$ch</span>,CURLOPT_SSLCERT,<span>$this</span>-><span>apiclient_cert);        
        curl_setopt(</span><span>$ch</span>,CURLOPT_SSLKEYTYPE,'PEM'<span>);
        curl_setopt(</span><span>$ch</span>,CURLOPT_SSLKEY,<span>$this</span>-><span>apiclient_key);
        
        </span><span>/*</span><span>
        if( count($aHeader) >= 1 ){
            curl_setopt($ch, CURLOPT_HTTPHEADER, $aHeader);
        }
        </span><span>*/</span><span>
        curl_setopt(</span><span>$ch</span>,CURLOPT_POST, 1<span>);
        curl_setopt(</span><span>$ch</span>,CURLOPT_POSTFIELDS,<span>$xml</span><span>);
        </span><span>$data</span> = curl_exec(<span>$ch</span><span>);
        </span><span>if</span>(<span>$data</span><span>){
            curl_close(</span><span>$ch</span><span>);    
            </span><span>$rsxml</span> = <span>simplexml_load_string</span>(<span>$data</span><span>);
            </span><span>if</span>(<span>$rsxml</span>->return_code == 'SUCCESS'<span> ){
                </span><span>return</span><span>true</span><span>;
            }</span><span>else</span><span>{
                </span><span>$this</span>->error = <span>$rsxml</span>-><span>return_msg;
                </span><span>return</span><span>false</span><span>;    
            }
            
        }</span><span>else</span><span>{ 
            </span><span>$this</span>->error = curl_errno(<span>$ch</span><span>);
             
            curl_close(</span><span>$ch</span><span>);
            </span><span>return</span><span>false</span><span>;
        }

    }
    
    </span><span>/*</span><span>*
     * WXHongBao::sendGroup()
     * 发送裂变红包,参数为裂变数量
     * @param integer $num 3-20
     * @return
     </span><span>*/</span><span>public</span><span>function</span> sendGroup(<span>$num</span>=3<span>){
        </span><span>$this</span>->amt_type = "ALL_RAND";<span>//</span><span>$amt; 固定值。发送裂变红包组文档指定参数,随机</span><span>return</span><span>$this</span>->send(<span>$this</span>->api_hb_group,<span>$num</span><span>);
    }
    
    </span><span>public</span><span>function</span><span> getApiSingle(){
        </span><span>return</span><span>$this</span>-><span>api_hb_single;
    }
    
    </span><span>public</span><span>function</span><span> getApiGroup(){
        </span><span>return</span><span>$this</span>-><span>api_hb_group;
    }
    
    </span><span>public</span><span>function</span> setNickName(<span>$nick</span><span>){
        </span><span>$this</span>->nick_name = <span>$nick</span><span>;
    }
    
    </span><span>public</span><span>function</span> setSendName(<span>$name</span><span>){
        </span><span>$this</span>->send_name = <span>$name</span><span>;
    }
    
    </span><span>public</span><span>function</span> setWishing(<span>$wishing</span><span>){
        </span><span>$this</span>->wishing = <span>$wishing</span><span>;
    }
    
    </span><span>/*</span><span>*
     * WXHongBao::setActName()
     * 活动名称 
     * @param mixed $act
     * @return void
     </span><span>*/</span><span>public</span><span>function</span> setActName(<span>$act</span><span>){
        </span><span>$this</span>->act_name = <span>$act</span><span>;
    }
    
    </span><span>public</span><span>function</span> setRemark(<span>$remark</span><span>){
        </span><span>$this</span>->remark = <span>$remark</span><span>;
    }
    
    </span><span>public</span><span>function</span> setOpenId(<span>$openid</span><span>){
        </span><span>$this</span>->re_openid = <span>$openid</span><span>;
    }
    
    </span><span>/*</span><span>*
     * WXHongBao::setAmount()
     * 设置红包金额
     * 文档有两处冲突描述 
     * 一处指金额 >=1 (分钱)
     * 另一处指金额 >=100 < 20000 [1-200元]
     * 有待测试验证!
     * @param mixed $price 单位 分
     * @return void
     </span><span>*/</span><span>public</span><span>function</span> setAmount(<span>$price</span><span>){
        </span><span>$this</span>->total_amount = <span>$price</span><span>;
        </span><span>$this</span>->min_value = <span>$price</span><span>;
        </span><span>$this</span>->max_value = <span>$price</span><span>;
    }
    </span><span>//</span><span>以下方法,为设置分裂红包时使用</span><span>public</span><span>function</span> setHBminmax(<span>$min</span>,<span>$max</span><span>){
        </span><span>$this</span>->min_value = <span>$min</span><span>;
        </span><span>$this</span>->max_value = <span>$max</span><span>;
    }
    
    
    </span><span>public</span><span>function</span> setShare(<span>$img</span>="",<span>$url</span>="",<span>$content</span>=""<span>){
        
        </span><span>//</span><span>https://mmbiz.qlogo.cn/mmbiz/MS1jaDO92Ep4qNo9eV0rnItptyBrzUhJqT8oxSsCofdxibnNWMJiabaqgLPkDaEJmia6fqTXAXulKBa9NLfxYMwYA/0?wx_fmt=png
        //http://mp.weixin.qq.com/s?__biz=MzA5Njg4NTk3MA==&mid=206257621&idx=1&sn=56241da30e384e40771065051e4aa6a8#rd</span><span>$this</span>->share_content = <span>$content</span><span>;
        </span><span>$this</span>->share_imgurl = <span>$img</span><span>;
        </span><span>$this</span>->share_url = <span>$url</span><span>;
    }
    
    </span><span>private</span><span>function</span><span> gen_nonce_str(){
        </span><span>$this</span>->nonce_str = <span>strtoupper</span>(<span>md5</span>(<span>mt_rand</span>().<span>time</span>())); <span>//</span><span>确保不重复而已</span><span>    }
    
    </span><span>private</span><span>function</span><span> gen_Sign(){
        </span><span>unset</span>(<span>$param</span><span>); 
        </span><span>//</span><span>其实应该用key重排一次 right?</span><span>$param</span>["act_name"]=<span>$this</span>->act_name;<span>//
</span><span>if</span>(<span>$this</span>->total_num==1){ <span>//</span><span>这些是裂变红包用不上的参数,会导致签名错误</span><span>$param</span>["client_ip"]=<span>$this</span>-><span>client_ip;
            </span><span>$param</span>["max_value"]=<span>$this</span>-><span>max_value;
            </span><span>$param</span>["min_value"]=<span>$this</span>-><span>min_value;
            </span><span>$param</span>["nick_name"]=<span>$this</span>-><span>nick_name;
        }
        
        </span><span>$param</span>["mch_billno"] = <span>$this</span>->mch_billno;   <span>//</span><span>$param</span>["mch_id"]=<span>$this</span>->mch_id;<span>//</span><span>$param</span>["nonce_str"]=<span>$this</span>->nonce_str;    <span>//</span><span>$param</span>["re_openid"]=<span>$this</span>->re_openid;<span>//
</span><span>$param</span>["remark"]=<span>$this</span>->remark;        <span>//
</span><span>$param</span>["send_name"]=<span>$this</span>->send_name;<span>//
</span><span>$param</span>["total_amount"]=<span>$this</span>->total_amount;<span>//
</span><span>$param</span>["total_num"]=<span>$this</span>->total_num;        <span>//
</span><span>$param</span>["wishing"]=<span>$this</span>->wishing;<span>//
</span><span>$param</span>["wxappid"]=<span>$this</span>->wxappid;<span>//
</span><span>if</span>(<span>$this</span>->share_content) <span>$param</span>["share_content"] = <span>$this</span>-><span>share_content;
        </span><span>if</span>(<span>$this</span>->share_imgurl) <span>$param</span>["share_imgurl"] = <span>$this</span>-><span>share_imgurl;
        </span><span>if</span>(<span>$this</span>->share_url) <span>$param</span>["share_url"] = <span>$this</span>-><span>share_url;
        
        </span><span>if</span>(<span>$this</span>->amt_type) <span>$param</span>["amt_type"] = <span>$this</span>->amt_type; <span>//
</span><span>ksort</span>(<span>$param</span>); <span>//</span><span>按照键名排序...艹,上面排了我好久
        
        //$sign_raw = http_build_query($param)."&key=".$this->apikey;</span><span>$sign_raw</span> = ""<span>;
        </span><span>foreach</span>(<span>$param</span><span>as</span><span>$k</span> => <span>$v</span><span>){
            </span><span>$sign_raw</span> .= <span>$k</span>."=".<span>$v</span>."&"<span>;
        }
        </span><span>$sign_raw</span> .= "key=".<span>$this</span>-><span>apikey;
        
        </span><span>//</span><span>file_put_contents("sign.raw",$sign_raw);//debug</span><span>$this</span>->sign = <span>strtoupper</span>(<span>md5</span>(<span>$sign_raw</span><span>));
    }
    
    </span><span>/*</span><span>*
     * WXHongBao::genXMLParam()
     * 生成post的参数xml数据包
     * 注意生成之前各项值要生成,尤其是Sign
     * @return $xml
     </span><span>*/</span><span>public</span><span>function</span><span> genXMLParam(){
        
        </span><span>$xml</span> = "<span><xml>
            <sign></span>".<span>$this</span>->sign."<span></sign> 
            <mch_billno></span>".<span>$this</span>->mch_billno."<span></mch_billno> 
            <mch_id></span>".<span>$this</span>->mch_id."<span></mch_id> 
            <wxappid></span>".<span>$this</span>->wxappid."<span></wxappid> 
            <nick_name><![CDATA[</span>".<span>$this</span>->nick_name."<span>]]></nick_name> 
            <send_name><![CDATA[</span>".<span>$this</span>->send_name."<span>]]></send_name> 
            <re_openid></span>".<span>$this</span>->re_openid."<span></re_openid> 
            <total_amount></span>".<span>$this</span>->total_amount."<span></total_amount> 
            <min_value></span>".<span>$this</span>->min_value."<span></min_value> 
            <max_value></span>".<span>$this</span>->max_value."<span></max_value> 
            <total_num></span>".<span>$this</span>->total_num."<span></total_num> 
            <wishing><![CDATA[</span>".<span>$this</span>->wishing."<span>]]></wishing> 
            <client_ip><![CDATA[</span>".<span>$this</span>->client_ip."<span>]]></client_ip> 
            <act_name><![CDATA[</span>".<span>$this</span>->act_name."<span>]]></act_name> 
            <remark><![CDATA[</span>".<span>$this</span>->remark."<span>]]></remark>             
            <nonce_str></span>".<span>$this</span>->nonce_str."<span></nonce_str>
            </span>"<span>; 
        
            
        </span><span>if</span>(<span>$this</span>->share_content) <span>$xml</span> .= "<share_content><![CDATA[".<span>$this</span>->share_content."<span>]]></share_content>
        </span>"<span>;
        </span><span>if</span>(<span>$this</span>->share_imgurl) <span>$xml</span> .= "<share_imgurl><![CDATA[".<span>$this</span>->share_imgurl."<span>]]></share_imgurl>
        </span>"<span>;
        </span><span>if</span>(<span>$this</span>->share_url) <span>$xml</span> .= "<share_url><![CDATA[".<span>$this</span>->share_url."<span>]]></share_url>
        </span>"<span>;
        </span><span>if</span>(<span>$this</span>->amt_type) <span>$xml</span> .= "<amt_type><![CDATA[".<span>$this</span>->amt_type."<span>]]></amt_type>
        </span>"<span>;
        
        </span><span>$xml</span> .="</xml>"<span>;
        
        </span><span>return</span><span>$xml</span><span>;
    }
    
    </span><span>/*</span><span>*
     * WXHongBao::gen_mch_billno()
     *  商户订单号(每个订单号必须唯一) 
        组成: mch_id+yyyymmdd+10位一天内不能重复的数字。 
        接口根据商户订单号支持重入, 如出现超时可再调用。 
     * @return void
     </span><span>*/</span><span>private</span><span>function</span><span> gen_mch_billno(){
        </span><span>//</span><span>生成一个长度10,的阿拉伯数字随机字符串</span><span>$rnd_num</span> = <span>array</span>('0','1','2','3','4','5','6','7','8','9'<span>);
        </span><span>$rndstr</span> = ""<span>;
        </span><span>while</span>(<span>strlen</span>(<span>$rndstr</span>)<10<span>){
            </span><span>$rndstr</span> .= <span>$rnd_num</span>[<span>array_rand</span>(<span>$rnd_num</span><span>)];    
        }
        
        </span><span>$this</span>->mch_billno = <span>$this</span>->mch_id.<span>date</span>("Ymd").<span>$rndstr</span><span>;
    }
}    
</span>?><br>然后实例化class.<br></span></span></span></span></span></span></span>
Copy after login

<span>    $toOpenId</span> = 'asdasdasd'; <span>//</span><span>接收红包的用户的微信OpenId</span><span>$hb</span> = <span>new</span><span> WXHongBao();<br></span><span>$hb</span>->newhb(<span>$toOpenId</span>,1000); <span>//</span><span>新建一个10元的红包,第二参数单位是 分,注意取值范围 1-200元
        //以下若干项可选操作,不指定则使用class脚本顶部的预设值</span><span>$hb</span>->setNickName("土豪有限公司"<span>);
          </span><span>$hb</span>->setSendName("土豪"<span>);
          </span><span>$hb</span>->setWishing("恭喜发财"<span>);
          </span><span>$hb</span>->setActName("发钱活动"<span>);
          </span><span>$hb</span>->setRemark("任性一把"<span>);

        </span><span>//</span><span>发送红包</span><span>if</span>(!<span>$hb</span>->send()){ <span>//</span><span>发送错误</span><span>echo</span><span>$hb</span>-><span>err();

        }</span><span>else</span><span>{

           </span><span>echo</span> "红包发送成功"<span>;

        }</span>
Copy after login

The above introduces how to send red envelopes through PHP WeChat public accounts, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What are the differences between Huawei GT3 Pro and GT4? What are the differences between Huawei GT3 Pro and GT4? Dec 29, 2023 pm 02:27 PM

Many users will choose the Huawei brand when choosing smart watches. Among them, Huawei GT3pro and GT4 are very popular choices. Many users are curious about the difference between Huawei GT3pro and GT4. Let’s introduce the two to you. . What are the differences between Huawei GT3pro and GT4? 1. Appearance GT4: 46mm and 41mm, the material is glass mirror + stainless steel body + high-resolution fiber back shell. GT3pro: 46.6mm and 42.9mm, the material is sapphire glass + titanium body/ceramic body + ceramic back shell 2. Healthy GT4: Using the latest Huawei Truseen5.5+ algorithm, the results will be more accurate. GT3pro: Added ECG electrocardiogram and blood vessel and safety

Ubisoft share falls to 10-year low after disappointing launch of Star Wars: Outlaws Ubisoft share falls to 10-year low after disappointing launch of Star Wars: Outlaws Sep 07, 2024 am 06:30 AM

The shares of the French video game developer Ubisoft reached a record low on Thursday. At a price of around 15.50 euros per share, the value has plummeted by around 10%. As a result, the company's market capitalization fell below 2 billion euros. In

Fix: Snipping tool not working in Windows 11 Fix: Snipping tool not working in Windows 11 Aug 24, 2023 am 09:48 AM

Why Snipping Tool Not Working on Windows 11 Understanding the root cause of the problem can help find the right solution. Here are the top reasons why the Snipping Tool might not be working properly: Focus Assistant is On: This prevents the Snipping Tool from opening. Corrupted application: If the snipping tool crashes on launch, it might be corrupted. Outdated graphics drivers: Incompatible drivers may interfere with the snipping tool. Interference from other applications: Other running applications may conflict with the Snipping Tool. Certificate has expired: An error during the upgrade process may cause this issu simple solution. These are suitable for most users and do not require any special technical knowledge. 1. Update Windows and Microsoft Store apps

Ubisoft shares fall to 10-year low after disappointing launch of Star Wars: Outlaws Ubisoft shares fall to 10-year low after disappointing launch of Star Wars: Outlaws Sep 08, 2024 am 06:36 AM

The shares of the French video game developer Ubisoft reached a record low on Thursday. At a price of around 15.50 euros per share, the value has plummeted by around 10%. As a result, the company's market capitalization fell below 2 billion euros. In

What does private mean in java What does private mean in java Nov 24, 2022 pm 06:27 PM

In Java, private means "private" and is an access control modifier used to modify classes, properties and methods. Class members modified with private can only be accessed and modified by the methods of the class itself, and cannot be accessed and referenced by any other class (including subclasses of the class); therefore, the private modifier has the highest level of protection.

How to Fix Can't Connect to App Store Error on iPhone How to Fix Can't Connect to App Store Error on iPhone Jul 29, 2023 am 08:22 AM

Part 1: Initial Troubleshooting Steps Checking Apple’s System Status: Before delving into complex solutions, let’s start with the basics. The problem may not lie with your device; Apple's servers may be down. Visit Apple's System Status page to see if the AppStore is working properly. If there's a problem, all you can do is wait for Apple to fix it. Check your internet connection: Make sure you have a stable internet connection as the "Unable to connect to AppStore" issue can sometimes be attributed to a poor connection. Try switching between Wi-Fi and mobile data or resetting network settings (General > Reset > Reset Network Settings > Settings). Update your iOS version:

php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 php提交表单通过后,弹出的对话框怎样在当前页弹出,该如何解决 Jun 13, 2016 am 10:23 AM

php提交表单通过后,弹出的对话框怎样在当前页弹出php提交表单通过后,弹出的对话框怎样在当前页弹出而不是在空白页弹出?想实现这样的效果:而不是空白页弹出:------解决方案--------------------如果你的验证用PHP在后端,那么就用Ajax;仅供参考:HTML code

Let's talk about why Vue2 can access properties in various options through this Let's talk about why Vue2 can access properties in various options through this Dec 08, 2022 pm 08:22 PM

This article will help you interpret the vue source code and introduce why you can use this to access properties in various options in Vue2. I hope it will be helpful to everyone!

See all articles