11 2018 档案
摘要:复制一个文件到服务器 scp -p 22 /Applications/MAMP/htdocs/h.php root@47.101.131.113://var/www/html 上面往往是端口,root开始是服务器的帐号和根目录,我的是apache所以根目录在/var/www/html目录下面,h.p
阅读全文
摘要:我用集成环境mamp刚装了扩展,惊讶地发现<?php info;?> 在浏览器里已经有mongodb了,但是mac 终端PHP -m 里没有,这个时候执行which php 查看一下路径,发现路径是我设置的默认的PATH。 网上查看各种操作都无济于事,php -m 还是没有mongodb扩展,于是执
阅读全文
摘要:composer直接下载是特别慢的,拿ci框架为例,看下图: 注意框里的那一段: "repositories": { "packagist": { "type": "composer", "url": "https://packagist.phpcomposer.com" } 复制到composer
阅读全文
摘要:<?php //连接mongodb $manager = new MongoDB\Driver\Manager("mongodb://localhost:27017"); //查询条件 $filter = ['user_id'=>['$gt'=>'0']];//查询条件,userid大于0 也可以为
阅读全文
摘要:首先说一下扩展,mongodb提供了两种,php5和php7,所以选择了php7的扩展。 使用pcel安装mongoDB扩展: 1,首先到PHP7的安装目录,我的安装目录是: $ /Applications/MAMP/bin/php/php7.1.1/bin/pecl install mongodb
阅读全文
摘要:<?php header("content-type:text/html;charset=utf-8"); /***@param $string目标字符串*@param $key 加密key*@return string */function encryption($string="",$key="
阅读全文
摘要:<?php header("Content-type:text/html;charset=utf-8"); //PC百度搜索 $key = "澳门金沙"; $url = 'http://www.baidu.com/s?word='.$key."&rn=50"; function curl_list(
阅读全文
摘要:<?phpclass MyRedis{ private static $handler; private static function handler(){ if(!self::$handler){ self::$handler = new Redis(); self::$handler -> c
阅读全文
摘要:PHP ci 框架自定义的函数可以放在helpers目录下,在config文件下面的autoload.php文件里,数组$autoload['helper'] = array('url','form','cookie','date','my_array_helper');加上即可。如图所示:
阅读全文
摘要:命令运行: 修改系统配置:系统偏好设置->安全性与隐私,修改为任何来源,如果没有的话执行以下命令: sudo spctl --master-disable //然后输入密码 sudo spctl --master-disable Rference 再打开app,就可以打开了
阅读全文
摘要:failed to push some refs to 报错解决方法:这个错误很大原因是github 仓库中的readme.md文件不在本地代码目录中,通过以下代码合并git pull --rebase origin master 这个时候就可以在本地文件中看到readme.md文件,之后再运行gi
阅读全文
浙公网安备 33010602011771号