示例#1
0
 static function QRcodeCreate($date, $path)
 {
     $q = new PHPQRcode();
     $q->png($date, $path);
 }
 public function encode($intext, $outfile = false)
 {
     $code = new PHPQRcode();
     if ($this->eightbit) {
         $code->encodeString8bit($intext, $this->version, $this->level);
     } else {
         $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive);
     }
     QRtools::markTime('after_encode');
     if ($outfile !== false) {
         file_put_contents($outfile, join("\n", QRtools::binarize($code->data)));
     } else {
         return QRtools::binarize($code->data);
     }
 }