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(val1 =>'张三',val2 => '李四',val3 => '王五',val4 => '李明',val5 => '周燕妮');
//foreach循环遍历数组
foreach($arr as $key => $value){
//注意“$value”后必须要一个空格,否则输 ......
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 ......
http://www.111cn.net/phper/19/dd73e6624c92e49e7755d3b43719677d.htm
很多网站在首页上做一些链接,让用户来选择将要访问的各自的语言页面,让中国人选择“中文”,韩国人选择“朝鲜语”,等等。那么能不能做程序来自动帮助选择呢?
答案是肯定的,大家都在用google,你用中文系统打开google的首页 ......
<?
class upload{
private $name; //$_FILES['file'][name]
private $type; //$_FILES['file'][type]
privat ......
(1) autoload机制概述
在使用PHP的OO模式开发系统时,通常大家习惯上将每个类的实现都存放在一个单独的文件里,这样会很容易实现对类进行复用,同时将来维护时也很便利。这也是OO设计的基本思想之一。在PHP5之前,如果需要使用一个类,只需要直接使用include/require将其包含进来即可。下面是一个实际的例子:
CODE:
/* ......