易截截图软件、单文件、免安装、纯绿色、仅160KB

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中foreach遍历数组(2)

<?php
  //声明数组变量
  $arr = array('张三','李四','王五','李明');
 
  //foreach循环遍历数组
  foreach($arr as $value){
   //注意“$value”后必须要一个空格,否则输出的结果不正确
   echo "$value<br/>";
  }
?> ......

PHP中foreach循环遍历数组(3)

<?php
 
  //声明数组变量
  $arr = array(val1 =>'张三',val2 => '李四',val3 => '王五',val4 => '李明',val5 => '周燕妮');
 
  //foreach循环遍历数组
  foreach($arr as $key => $value){
   //注意“$value”后必须要一个空格,否则输 ......

PHP出现Warning:Illegal offset type in

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 ......

PHP autoload机制详解

(1) autoload机制概述
在使用PHP的OO模式开发系统时,通常大家习惯上将每个类的实现都存放在一个单独的文件里,这样会很容易实现对类进行复用,同时将来维护时也很便利。这也是OO设计的基本思想之一。在PHP5之前,如果需要使用一个类,只需要直接使用include/require将其包含进来即可。下面是一个实际的例子:
CODE:
/* ......

windows下开发PHP扩展dll(无需Cygwin)

windows下开发php扩展网上很多资料都说需要Cygwin,其实完全可以不必安装该东东。没错,是可以在linux下生成骨架后拷到windos下来用,但是,如果没有linux环境呢?什么,装虚拟机?我晕,你咋又绕回去了- -! 除了编译外,shell环境主要就是为了生成扩展的骨架,其实骨架已经在php源码包中了了,我们只需要把相关名字替换一 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号