git init //在某个目录下使用命令创建本地仓库
git add * //提交某个文件就写文件名,所有就*
git commit -m "提交版本介绍"
git remote add origin git@github.com:用户名/存储库名.git
git ...
由于windows使用的gbk编码,导致在服务器上解压出来取得的文件名是乱码$real_zip_file = './test.zip';
$zip = new \ZipArchive();
if ($zip->open($real_zip_file)...
width: 110px; height:110px; position: absolute; left:50%; margin-left:-55px;绝对定位以后,left设置为50%,然后margin-left设置为本身宽度的一半,就可以水平居中了...
有道翻译API,请求方式:GEThttp://fanyi.youdao.com/translate?&doctype=json&type=AUTO&i=你好返回格式:{
"type": "ZH_CN2EN",
"errorCode": 0,
"elapsedTime...
jQuery监听键盘事件<script type="text/javascript">
$(document).keydown(function(e){
alert(e.keyCo...
引入文件:<script type="text/javascript" src="http://pv.sohu.com/cityjson?ie=utf-8"></script>示例文件alert(returnCitySN.cip)//弹出IP地址
//简单示例
var url = "http...
function clearAllCookie() {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g);
if(keys) {
...
var a=[1,2,3,5];
alert(Math.max.apply(null, a));//最大值。
alert(Math.min.apply(null, a));//最小值。...
$str = file_get_contents('111.txt');//将整个文件内容读入到一个字符串中
$str_encoding = mb_convert_encoding($str, 'UTF-8', 'UTF-8,GBK,GB2312,BIG5');//转换字符集(编码)
$arr = explode(...
$(window).resize(function () { //当浏览器大小变化时
alert($(window).height());&n...