默认网站根目录为/usr/local/nginx/html,要将它改成/homw/www
vi /usr/local/nginx/conf/nginx.conf
将其中的
location / {
root html;
index index.php index.html index.htm;...
分类:
Web程序 时间:
2014-07-13 17:06:03
阅读次数:
219
今天看了一下wordpress的代码,里面有些少见的php替代语法,
<?php the_content( __( 'Continue reading →', 'thebox' ) ); ?>
'' . __( 'Pa...
分类:
Web程序 时间:
2014-07-13 16:57:21
阅读次数:
217
最近开发微信扩展功能,用到了mb_substr()函数。系统在windows下测试都是正常的,但是放到aliyun(选用的Centos系统)下面就出现了问题,Call to undefined function mb_substr(),报出这个异常。
很显然,这是调用了没有定义的函数,可是环境都采用yum安装的,Apache和PHP都是自动安装的。怎么会出现这个错误呢?其实PHP本身也是可配置的...
分类:
Web程序 时间:
2014-07-13 16:10:44
阅读次数:
181
JS控制新窗口打开网页,防止蜘蛛爬行
点击 这里也可以是图片
function locationUrl(){
var u1 = 'http://www.';
var u2 = 'baidu.com/hl/';
var u3 = 'bak_header.php';
var url = u1+u2+u3;
window.open(url);
...
分类:
Web程序 时间:
2014-07-13 15:44:24
阅读次数:
179
项目中要用到采集的数据,所以就先拿CSDN博客来试了试。这里使用Simple HTML DOM(官网)这个库,它能够方便的遍历HTML文档。
php
include_once('simple_html_dom.php');
header('Content-Type:text/html;charset=utf-8');
$html = file_get_htm...
分类:
Web程序 时间:
2014-07-13 15:29:04
阅读次数:
262
<?phpdefined(‘ACC‘)||exit(‘AccessDenied‘);classModel{protected$db=null;publicfunction__construct(){try{$this->db=mysql::getIns();}catch(Exception$e){//$e就是前文中throw出来的$error(Exception的实例)//$e对象有一些方法和属性,能准确判断出问题的行.$err=‘‘;..
分类:
Web程序 时间:
2014-07-13 14:48:25
阅读次数:
193
1. 什么是ticks
我们来看一下手册上面对ticks的解释:
A tick is an event that occurs for every N low-level statements executed by the parser within the declare block. The value for N is specified using ticks=N withi...
分类:
Web程序 时间:
2014-07-13 13:55:59
阅读次数:
269
执行:
./configure --prefix=/usr/local/php --enable-fastcgi --enable-fpm
之后出现
Running FastCGI Process Manager checks
checking for php-fpm config file path... $prefix/etc/php-fpm.conf
checking for ...
分类:
其他好文 时间:
2014-07-13 13:50:43
阅读次数:
205