//IP地址
service('request')->getIPAddress();
//COOKIE
if($current_op == 'search') {
$postdata['newssetting']['like'] = array(
'skey' => $this->request->getVar('skey'),
'svalue' = $this->request->getVar('svalue'),
'sdisplay' => $this->request->getVar('sdisplay'),
);
set_cookie("_ha_searchcookie", serialize($postdata), '600');
} elseif(get_cookie('_ha_searchcookie')) {
//读取COOKIE的值
$searchcookie = unserialize(get_cookie('_ha_searchcookie'));
//COOKIE中,包含该数组,则显示,否则不显示
if(array_key_exists('newssetting', $searchcookie)) {
$postdata = $searchcookie;
}
}
//使用 base64_encode 加密,使用 base64_decode 解密
//写入文件
$fp = fopen($file_controllers, 'w');
fwrite($fp, $data);
fclose($fp);
public function jxcordersdetails_crud_orders($op = 'insert', $id = 0)
{
$builder = $this->db->table('jxclogs');
//影响的数据库数组
$posts = [
//'lognotes' => service('request')->getVar('lognotes'),
'lognotes' => '',
'logdateline' => time(),
'loglastip' => service('request')->getIPAddress(),
];
if ($op == 'insert') {
$builder->insert($posts);
//$newid = $this->table('jxclogs')->insertID();
$newid = $this->insertID();
return $newid;
}
if ($op == 'update' && $id) {
$this->update($id, $posts);
return $id;
}
return 0;
}
$this->set('omoney', 'omoney+'.$newposts['dtotal'], FALSE);
$builder->set('field', 'field+1', FALSE);
$builder->where('id', 2);
$builder->update();
$timestamp = time();
$times = date('Y-md-d H:i:s', $timestamp);
$timestamp = strtotime($times);
<p class="text-danger">Text red to emphasize danger</p>
<p class="lead">Lead to emphasize importance</p>
<p class="text-success">Text green to emphasize success</p>
<p class="text-info">Text aqua to emphasize info</p>
<p class="text-primary">Text light blue to emphasize info (2)</p>
<p class="text-danger">Text red to emphasize danger</p>
<p class="text-warning">Text yellow to emphasize warning</p>
<p class="text-muted">Text muted to emphasize general</p>
<button type="button" class="btn btn-block btn-default">Default</button>
<button type="button" class="btn btn-block btn-primary">Primary</button>
<button type="button" class="btn btn-block btn-secondary">Secondary</button>
<button type="button" class="btn btn-block btn-success">Success</button>
<button type="button" class="btn btn-block btn-info">Info</button>
<button type="button" class="btn btn-block btn-danger">Danger</button>
<button type="button" class="btn btn-block btn-warning">Warning</button>
<button type="button" class="btn btn-block btn-light">Light</button>
<button type="button" class="btn btn-block btn-dark">Dark</button>
class可以继续增加: btn-lg btn-sm btn-xs btn-flat disabled
class可以换成下面的,同样可以增加上面一行的class:
btn btn-block btn-default
btn btn-block btn-outline-primary btn-lg
btn btn-block bg-gradient-primary Ubuntu CentOS Debian Fedora Slackware Mint Xubuntu Arch OpenSUSE Red Hat Slackel PureOS Mageia PCLinuxOS Puppy Zorin BunsenLabs Kubuntu Manjaro Bodhi Netrunner Neptune Kali Black Lab Solus
PHP is a popular general-purpose scripting language that is especially suited to web development. Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
CodeIgniter is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications.