as3:把方法当作方法的参数
把方法当作方法的参数 ...File类包括用于指向Mac OS、Windows和Linux中的标准目录的静态属性
File类包括用于指向Mac OS、Windows和Linux中的标准目录的静态属性unicode转utf8函数
2019-11-15 dingshangchao php开发
1. function unicode2utf8($str) { $str = '{"result_str":"' . $str . '"}'; $strarray = json_decode ( $str, true ); return $test = $strarray ['result_str']; }
2.
function unicode_to_utf8($unicode_str) {
$code = intval(hexdec($unicode_str));
//这里注意转换出来的code一定得是整形,这样才会正确的按位操作
$ord_1 = decbin(0xe0 | ($code >> 12));
$ord_2 = decbin(0x80 | (($code >> 6) & 0x3f));
$ord_3 = decbin(0x80 | ($code & 0x3f));
$utf8_str = chr(bindec($ord_1)) . chr(bindec($ord_2)) . chr(bindec($ord_3));
return $utf8_str;
}
标签: php
css之px、em、rem
css之px、em、remNginx访问PHP文件的File not found错误处理
2019-11-8 dingshangchao 服务器
Nginx访问PHP文件的File not found错误处理
这个错误很常见,原有有下面两种几种
1. php-fpm找不到SCRIPT_FILENAME里执行的php文件2. php-fpm不能访问所执行的php,也就是权限问题
第一种情况更改配置文件nginx.conf
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
替换成下面
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
然后重新加载nginx配置文件
/etc/init.d/nginx reload
第二种情况
两种解决方法:第一种,就是把你root文件夹设为其他用户允许
第二种,找到你的php-fpm的配置文件,找到下面这段,把apache替换成你要的用户组
; RPM: apache Choosed to be able to access some dir as httpd
user = www
; RPM: Keep a group allowed to write in log dir.
group = www
js原型
js原型Air for Desktop创建文件及文件夹
Air for Desktop创建文件及文件夹 ...CentOS配置Nginx官方的Yum源
2019-11-1 dingshangchao 服务器
发现使用命令yum -y install nginx不能安装nginx,本地centos系统的yum仓库并没有nginx,其实就是新增一个yum源解决。