- 博客(6)
- 收藏
- 关注
原创 url 中带有+的问题
今天遇到一个坑,php通过$_GET获取参数,如果参数中带有+,会转移成空格。所以如果想用get方法传参数,php要使用urlencode,js要使用encodeURIComponent进行编码才能使用。...
2018-07-23 23:21:32
1344
原创 ajax动态生成页面
通过$.post()提交到指定路径,然后根据用append函数,在指定的地方添加$.post('http://'+weburl+'/index/index.php?s=/home/Tower/homeIndex.html', {}, function(result){ $.each(result, function(index, item){ $(".ba_ul").append('No
2018-01-10 21:37:07
1055
原创 Thinkphp联合查询
1.table方法要写清数据表的全名,包括前缀,可以使用别名$Model->table('think_blog blog,think_type type')->where('blog.typeid=type.id')->field('blog.id as id,blog.title,blog.content,type.typename as type')->order('blo
2018-01-10 21:16:41
262
转载 PHP cookie
如何创建 cookie? setcookie() 函数用于设置 cookie。 setcookie(name, value, expire, path, domain); 注释:setcookie() 函数必须位于 标签之前。 如何取回 Cookie 的值? $_COOKIE[“user”]
2017-11-22 21:04:56
119
转载 js cookie
$.cookie(‘the_cookie’, ‘the_value’, { expires: 7, path: ‘/’ });注:在默认情况下,只有设置cookie的网页才能读取该cookie。如果想让一个页面读取另一个页面设置的cookie,必须设置cookie的路径。相关参数的解释 expires: 365定义cookie的有效时间,值可以是一个(从创建cookie时算起,以天为单位)或一个D
2017-11-22 20:53:47
150
原创 php strotime
strtotime(“now”) strtotime(“15 October 1980”) strtotime(“+5 hours”) strtotime(“+1 week”) strtotime(“+1 week 3 days 7 hours 5 seconds”) strtotime(“next Monday”) strtotime(“last Sunday”)
2017-11-22 20:45:04
397
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人