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
Homebrew build logs for python3 on macOS 10.12.6 | |
Build date: 2017-09-21 18:03:30 |
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
/** | |
* 批量插入或更新记录 | |
* 根据MySQL的DUPLICATE KEY UPDATE特性, 编写的功能 | |
* 如果操作的数据可能拥有新数据, 则使用该方法的时候表主键字段不能拥有auto_increment特性 | |
* | |
* ```php | |
* ActiveRecord::batchUpdateOrCreate(['primary_id', 'name'], ['1', 'test'], ['name']); | |
* ``` | |
* | |
* @param array $columns 字段名字 |
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
#!/usr/bin/php | |
<?php | |
$host = 'https://www.cloudxns.net/api2'; | |
$apiKey = ''; | |
$secretKey = ''; | |
$date = date('r'); | |
$ipFile = '/tmp/.current_ip'; | |
$ddnsLock = '/tmp/.ddns_lock'; | |
$logFile = '/opt/update.ddns.log'; | |
if (is_readable($ddnsLock)) { |