This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* 微信PHP-SDK | |
* 服务器端必须要有 CURL 支持 | |
* 2015年7月修正版本 | |
* @author 、小陈叔叔 <[email protected]> | |
* https://coding.net/u/cjango/p/wechat_sdk/git | |
* 7月10日,完善红包功能, | |
*/ | |
namespace Tools; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set("memory_limit", "4G"); | |
/** | |
* @param string $input | |
*/ | |
function invoke($input) | |
{ | |
$bootstrap = new \PhalconPlus\Bootstrap(dirname(dirname(__DIR__))); | |
$di = new \Phalcon\DI\FactoryDefault\CLI(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
public function createPdf() | |
{ | |
$this->view->disable(); | |
$userId = $this->request->getPost('bbb'); | |
$rez['rez'] = Users::findFirstById($userId) | |
$html = $this->view->getRender('reports', 'pdf_report', $rez); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$redirect_stdout = false; | |
$workers = []; | |
$worker_num = 8; | |
//swoole_process::daemon(0, 1); | |
for($i = 0; $i < $worker_num; $i++) | |
{ | |
$process = new swoole_process('child_async', $redirect_stdout); | |
$pid = $process->start(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef BULLSOFT_PHP_H | |
#define BULLSOFT_PHP_H | |
#ifndef PHP_FE_END | |
#define PHP_FE_END { NULL, NULL, NULL, 0, 0 } | |
#endif | |
#ifndef ZEND_MOD_END | |
#define ZEND_MOD_END { NULL, NULL, NULL, 0 } | |
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace NCFGroup\Common\Library; | |
/** | |
* AES对称加密封装 (包括base64) | |
* 算法: AES128位 | |
* 模式: ECB | |
* 填充: PKCS5Padding | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"io" | |
"log" | |
"net" | |
"bytes" | |
"bufio" | |
"strings" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# mysql 自动备份 | |
TIMESTAMP=$(date +"%Y%m%d") | |
BACKUP_DIR="/usr/local/mysql/backup" | |
MYSQL_USER="root" | |
MYSQL=/usr/local/mysql/bin/mysql | |
MYSQL_PASSWORD="root" | |
MYSQLDUMP=/usr/local/mysql/bin/mysqldump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use | |
Phalcon\Mvc\Model, | |
Phalcon\Mvc\Model\Message, | |
Phalcon\Db\RawValue; | |
/** | |
* 基础 Model 实现 | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$str = "0123ABCDFWS\",.?<>{}[]*&^%#@!~()+-|:;"; | |
echo "$str"; | |
echo "<br />"; | |
$str = preg_replace('/\xa3([\xa1-\xfe])/e', 'chr(ord(\1)-0x80)', $str); | |
echo $str; |