php Mod rewrite test
In the directory where you plan to install Elgg, do the following:
Create the file .htaccess and add these two lines
RewriteEngine on
RewriteRule ^testing.php$ modrewrite.php
This tells the webserver to load modrewrite.php when testing.php is
requested.
In order to get this test to work on some virtual servers, you
may need to add:
RewriteBase /
prior to the RewriteRule line.
Create the file modrewrite.php with this line
<?php echo "mod_rewrite works"; ?>
Create the file testing.php with this line
<?php echo "mod_rewrite does not work"; ?>
Now use your web browser to load testing.php. The text that shows will
tell you whether mod_rewrite is working
相关文档:
<?php
//声明数组变量
$arr = array('张三','李四','王五','李明');
//foreach循环遍历数组
foreach($arr as $value){
//注意“$value”后必须要一个空格,否则输出的结果不正确
echo "$value<br/>";
}
?> ......
<?php
//声明数组变量
$arr = array(val1 =>'张三',val2 => '李四',val3 => '王五',val4 => '李明',val5 => '周燕妮');
//foreach循环遍历数组
foreach($arr as $key => $value){
//注意“$value”后必须要一个空格,否则输 ......
<?php
//获得系统时间函数(注意参数中大写Y代表完整年份,小写y代表年份简写)
$sum = date("Y-m-d");
$sum1 = date("y-m-d");
echo "$sum<br/>";
echo "$sum1<br/>";
//md5加密函数
$pass = md5("张三");
......
Warning
: Illegal offset type in
Warning
: Illegal offset type in isset or
empty in
前几天写程序的时候碰到一个这种错误提示
如果你使用这样的表示方法如下:
$arr = array();
class a
{
}
$o = new a;
echo $arr[$o];
就会出现上面的错误提示,因为不能使用实例化的对象来作为数组的索引,或者在使用i ......
rsync 是一款高效的远程数据备份和镜象工具,可快速地同步多台主机间的文件,其具有如下特性:
支持链接、所有者、组信息以及权限信息的拷贝;
通过远程 shell(ssh, rsh)进行传输;
无须特殊权限即可安装使用;
流水线式文件传输模式,文件传输效率高;
支持匿名操作;
通过远程 shell 方式:
rsync [OPTION] [USE ......