最近在通过php来写一个类似ftp的的web-ftp平台;
需要兼容linux和window的路径访问;
过程中发现window与linux使用的路径编码是不一样的,比如linux好像是utf-8,window却是gbk;
php的编码是utf-8,如果路径中有中文,统一使用utf-8编码来访问路径,就会出现像file_exists这类fs方法出现无法访问情况;
因为路径不存在,原因就是u...
分类:
Web程序 时间:
2015-06-08 11:43:21
阅读次数:
140
position = 0; } function rewind() { var_dump(__METHOD__); $this->position = 0; } function current() { var_dump(__METHOD...
分类:
Web程序 时间:
2015-06-08 11:37:00
阅读次数:
125
工作中遇到的代码if (ini_get('magic_quotes_gpc')) { function stripslashesRecursive(array $array){ foreach ($array as $k => $v) { if (is_string($v)){ $arr...
分类:
Web程序 时间:
2015-06-08 11:36:25
阅读次数:
150
修改Cookie laravel_session的名称方法:打开文件:config\session.php找到值:laravel_session修改为你所需要的cookie名称即可。当然,还有更多的功能在这个文件配置里,这是配置session的。比如:session的存储在哪(database、me...
分类:
Web程序 时间:
2015-06-08 11:35:29
阅读次数:
229
今天在配置ecstore2.0的定时任务时候,发现ECOS后台每30秒通过JS调用http://localhost/ecstore-bugfix/index.php/shopadmin/index.php?ctl=default&act=status地址来执行定时任务是无效的。ECOS如果没办法执行...
分类:
其他好文 时间:
2015-06-08 11:22:50
阅读次数:
165
http://acm.hdu.edu.cn/showproblem.php?pid=5265#include
#include
#include
using namespace std;
const int maxn=100000+5;
int data[maxn];
int main()
{
int m,p;
whil...
分类:
其他好文 时间:
2015-06-08 09:50:39
阅读次数:
94
1.使用curl:curl -sS https://getcomposer.org/installer | php2.使用php:php -r "readfile('https://getcomposer.org/installer');" | php3.手动下载:composer.phar 文件。...
分类:
系统相关 时间:
2015-06-08 09:38:48
阅读次数:
163
Linux运维第三阶段(七)apache服务一、协议:HTTP超文本传输协议;核心:HTML超文本标记语言URL:统一资源定位符http://或https://搭建环境:linux+apache+mysql+phplinux+nginx+mysql+phpwindows+IIS+SQLserver+asprpm包安装所需软件:httpd,mysql,mysql-server,php,php-devel..
分类:
Web程序 时间:
2015-06-08 06:18:05
阅读次数:
118
整理一下网上PHP的学习路线(1)Html技术 Css样式(css选择器,属性,浮动,定位); JS(面向对象,事件,dom浮动)(2)PHP的基础 搭建开发环境; Php数据类型,PHP运算符; PHP内置函数(3)面向对象 PHP类和对象的概念,构造和析构函数,垃圾回收; 类的多态,类...
分类:
Web程序 时间:
2015-06-08 00:48:32
阅读次数:
167
获取前一天的时间:
$mytime= date("Y-m-d H:i:s", strtotime("-1 day"));
获取三天前的时间:
$mytime= date("Y-m-d H:i:s", strtotime("-3 day"));
获取前一个月的时间:
$mytime= date("Y-m-d H:i:s", strtotime("-1 month"));
获取前3个月的时...
分类:
Web程序 时间:
2015-06-07 23:42:11
阅读次数:
305