巫妖天下 - LichSky

关于作者:专注于微软平台项目架构、管理和企业解决方案。熟悉各类技术手段、架构设计、开发和项目管理。现主要从事项目开发、架构、管理工作。

PHP数据处理与读取

[CODE_LITE]

$host = "LocalHost";
$username = "mokey";
$password = "123456";
$db = "newoa";

/* ==================================SQL语句处理============================================= */

// mysql_connect($host,$username,$password) or die("Unable to connect MySQL");
...

PHP时间戳与时间的相互转换

[CODE_LITE]
$datetime = date("Y-m-d H:i:s");
echo "时间:".$datetime."
";
echo "对应时间戳:".strtotime($datetime)."
";
echo "==============================
";
$timestamp = 1210003200;
$datetime = date('Y-m-d H:i:s', $timestamp);
echo "时间戳:".strtotime($datetime)."
";
...

Host is not allowed to connect to this MySQL server的解决办法

假如数据库为:newoa
创建用户:mokey
密码: 123456

-----------------------------------------------

进入Mysql

>CREATE USER mokey IDENTIFIED BY '123456';

>grant insert,delete,update,select,drop,create on newoa.* to mokey@"%" identified by "123456"; ...

php http_get

[CODE_LITE]
array(
'method'=>"GET",
'header'=>"Content-Type: text/html; charset=GBK"
)
);
$context = stream_context_create($opts);


//传参值

php_UniCode编码

//转编码
function CodeToUni($code) {
  $code = iconv('gbk', 'ucs-2', $code);
  //当Linux时,'UCS-2BE'
  //http://www.veryide.com/archive.php?id=52
  return strtoupper(array_pop(unpack('H*', $code)));
}

CentOS 装 LNMP一键安装包日志

1.下载个 虚拟机 已安装好的文件http://www.21andy.com/blog/20120831/2096.html,我选了centos-5.0-i386-

server.zip, 400M
2.用虚拟机打开,输入 root 和 密码 thoughtpolice
3.觉得密码不爽,改密码命令 [ echo root:123456 | chpasswd ]
4.查查他局域网内的ip是多少,我好远程控制,输入命令 [ ifconfig eth0 ];得出ip是:192.168.128.129
...
分页:[«]1[»]

Powered By Z-Blog 1.8 Walle Build 100427

Copyright 巫妖天下(lichsky@163.com) All Rights Reserved.