Demo entry 6733049

高富

   

Submitted by anonymous on Apr 16, 2018 at 14:51
Language: PHP. Code size: 741 Bytes.

  
    public function newsub($fromuser){  //新用户订阅
        
          $query_newsub="INSERT INTO users (openid)values('$fromuser');"; //   
          $this->Mysqli->query("set names utf8");
          $result1=$this->Mysqli->query($query_newsub);

    }
    
     
   public  function getDistance($lat1, $lng1, $lat2, $lng2)   //获取两个经纬度之间的距离
            { 
            $earthRadius = 6367000; //approximate radius of earth in meters 
            
            /* 
            Convert these degrees to radians 
            to work with the formula 
            */ 
            
            $lat1 = ($lat1 * pi() ) / 180; 
            $lng1 = ($lng1 * pi() ) / 180; 
            
            $lat2 = ($lat2 * pi() ) / 180; 

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).