floor() (舍去小数部分,只取整数) ceil() (进一取整,只要有小数部分,直接加一) round() (四舍五入取整)
curl返回的数据中带有bom格式,需要转换; 有些返回数据直接: print_r(json_decode($data,true)); 就可以转换。 $url = "http://localhost/web_services.php"; $post_data = array ("username" => "bob","key" …
Thinkphp框架 后台的路径是admin,这样不安全,需要更改这个目录 方法是修改/application/common/conf/config.php 中的'MODULE_ALLOW_LIST' ,把Admin改为其它名称,比如,Manage, 另外,添加, 'URL_MODULE_MAP' => array('manage'=>…
/** * 发送post请求 * @param string $url 请求地址 * @param array $post_data post键值对数据 * @return string */ function send_post($url, $post_data) { $postdata = http_build_query($post_data…
为已经添加好的数据表添加外键: 语法:alter table 表名 add constraint FK_ID foreign key(你的外键字段名) REFERENCES 外表表名(对应的表的主键字段名); 例: alter table tb_active add constraint FK_ID foreign key(user_id) REF…
修改php.ini文件 post_max_size = 200M upload_max_filesize = 200M
background-image: url('../img/img_bg.png'); background-size:cover;
备忘一下: windows上用phpstudy比较简便,但是其默认的php所有版本都是32位的,有坑,比如int最大值。 所以从php官网 点击打开链接http://windows.php.net/download#php-7.0-nts-VC14-x64 , 下载一个64位的php7丢到phpstudy的php目录下面去(和其他版本一起的那个目录…
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> 菜鸟教程(runoob.com) </title> <style> #grad1 { height: 150px; width: 200px; …
/* 圆角 */ -moz-border-radius-topleft:15px; -moz-border-radius-topright:15px; -moz-border-radius-bottomright:15px; -moz-border-radius-bottomleft:15px; -webkit-border-top-left-ra…