opcache.memory_consumption=128 opcache.max_accelerated_files=4000 opcache.validate_timestamps=0 # 生产环境建议关闭 opcache.revalidate_freq=60 # 开发环境可设置
修改
uc_server/data/config.inc.php
找到
define('UC_FOUNDERPW','xxxxxx');
define('UC_FOUNDERSALT','xxxx');
修改为
define('UC_FOUNDERPW','047099adb883dc19616dae0ef2adc5b6');
define('UC_FOUNDERSALT','311254');
提示无权限的话修改config.inc.php 文件的权限为可编辑
创始人密码就是 123456789 了
xml转array
字串
$xml = simplexml_load_string($data);
$array = json_decode(json_encode($xml),TRUE);
文件
$xml = simplexml_load_file($data);
$array= json_decode(json_encode($xml),TRUE);
或者
$array = (array) sim...
function whois_query($domain) {
// fix the domain name:
$domain = strtolower(trim($domain));
$domain = preg_replace('/^http:\/\//i', '', $domain);
$domain = preg_... //娱乐
$a = array(11,22,3523,45,24,564,55,34,56423,5,34,654,4);
$count = count($a);
for($i=0;$i<$count;$i++){
$min = $a[$i];
$mink = $i;
... 代码如下
<?php
/**
* 获取某段时间内修改的文件及结构
*
* @author aboc QQ:9986584
* @website http://www.phpec.org
*/
header('Content-Type:text/html;charset=utf-8');
$savepath = 'F:/lastedit/';
if(isset... <?
error_reporting(0);
Header("...PHP有着众多的内置函数,其中大多数函数都被开发者广发使用。但也有一些同样有用却被遗忘在角落,本文将介绍7个鲜为人知功能却非常酷的函数。
1.highlight_string()
当需要在网页中展示PHP代码时,highlight_string()函数就显得非常有用。该函数通过PHP内置定义的颜色,返回函数中代码的高亮显示版本。
<?php highlight_strin...
背景图填充白色背景
$white = imagecolorallocate($dstim,255,255,255); imagefilledrectangle($dstim,0,0,$width,$height,$white); imagecolortransparent($dstim,$white);
设置图片走透明通道
$img = imagecreatefrompng($src);...
function CsubStrPro($str, $start, $length, $charset = "utf-8", $suffix = false)
{
if (function_exists ( "mb_substr" ))
return mb_substr ( $str, $start, $length, $charset );
$... Fatal error: Call to undefined function: m...
<?php
function std_class_object_to_array($stdclassobject)
{
$_array = is_object($stdclassobject) ? get_object_vars($stdclassobject) : $stdclassobject;
foreach ($_array as $key => $value) {
$value = (is_array($value) || is_object($value)) ? std_class_object_to_array($value) : $value;
$array[$key] = $value;
}
return $array;
}buffer是一个内存地址空间,Linux系统默认大小一般为4096(4kb),即一个内存页。主要用于存储速度不同步的设备或者优先级不同的设备之间传办理数据的区域。通过buffer,可以使进程这间的相互等待变少。这里说一个通俗一点的例子,你打开文本编辑器编辑一个文件的时候,你每输入一个字符,操作系统并不会立即把这个字符直接写入到磁盘,而是先写入到buffer,当写满了一个buffer的时候,才会把...
<?php
header("Content-type:text/html;charset=utf-8");
function is_mobile(){
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$mobile_agents = Array("240x320","acer","acoo...