![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
php
StrGlee
人生苦短,我用python
展开
-
php中提示Undefined index的解决方法
我们经常接收表单POST过来的数据时报Undefined index错误,如下: $act=$_POST['action'];用以上代码总是提示Notice: Undefined index: act in D:\test\post.php on line 20另外,有时还会出现Notice: Undefined variable: Submit ...... 等一些这样的提示转载 2014-04-05 20:57:12 · 745 阅读 · 0 评论 -
PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone
在用PHP5.3以上的PHP版本时,只要是涉及时间的会报一个"PHP Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_defaul转载 2014-04-07 16:51:33 · 416 阅读 · 0 评论 -
PHP 时间与字符串的相互转化
1、求两个日期的差数,例如2007-3-5 ~ 2007-3-6 的日期差数echo abs(strtotime("2007-3-5") - strtotime("2007-3-6"))/60/60/24;echo "天"; 2、JS 获取当前日期var myDate = new Date();myDate.getYear(); //获取当前年份(2位)m转载 2014-04-26 07:29:21 · 792 阅读 · 0 评论 -
phpmyadmin打开很慢的解决方法
这篇文章主要介绍了phpmyadmin打开很慢的解决方法,一般这个问题的原因是phpmyadmin的版本检测造成的,因为phpmyadmin的官网有时会打不开,这时只要取消代码中的版本检测即可解决这个问题,需要的朋友可以参考下phpmyadmin4系列通通加载缓慢的最终原因是最近phpmyadmin的官网经常打不开,而phpmyadmin页面会自动检查官网上的程序版本更新,所以当你进入转载 2014-08-02 16:38:20 · 1811 阅读 · 0 评论 -
PHP+jQuery+jCrop在线上传裁剪头像(内含源码)
源码里面使用到两个开源的jQuery插件:其一是Ajax上传用的是uploadify,这个上传插件比较牛逼,并且可以自定义的东西也比较多,demo里面我用的不完善,没有把项目里面用到的取消上传和删除功能加上,同样也可以使用其他不需要使用Flash的jQuery上传插件。其二是jQuery jCrop,用于裁剪已经上传好的图片。 服务端我写了3个PHP文件,config.inc.ph转载 2014-08-02 17:40:20 · 1662 阅读 · 0 评论 -
php控制结构语句declare中的tick的详解[整理版]
先看看手册是怎么说的:declare 结构用来设定一段代码的执行指令。declare 的语法和其它流程控制结构相似:1declare (directive)2 statementdirective 部分允许设定 declare 代码段的行为。目前只认识两个指转载 2014-07-13 11:59:43 · 560 阅读 · 0 评论 -
php调用远程数据
本文介绍了php调用远程数据的方法,php curl调用远程数据的例子,需要的朋友参考下。默认不打开文件系统和流配置选项 allow_url_fopen ,建议使用一个替代的函数模块 cURL。php cURL 远程读取数据的方法:例1,allow_url_fopen = On: 代码示例:$str = file_get_contents("http://w转载 2015-01-14 17:06:39 · 446 阅读 · 0 评论 -
laravel cookie的使用方法
一Route::get('cookieset', function(){ $foreverCookie = Cookie::forever('forever', 'Success'); $tempCookie = Cookie::make('temporary', 'Victory', 5); return Response::make()->withCookie($原创 2014-09-23 11:13:25 · 6674 阅读 · 0 评论