Do not throw exception in exception_handler function and __destruct without try-catch

Do NOT throw exception in exception_handler function, if you do it like below, the error “Fatal error: Exception thrown without a stack frame in Unknown on line 0” will occur set_exception_handler(‘handle_exception’); function handle_exception($e) { throw new Exception(‘throwed in handle_exception’); } throw new Exception(‘error occur’); if you try-catch the Exception in exception_handler function, it will be … Read more

在windows下用wingrub安装backtrack 4 final双系统

在windows操作系统下利用wingrub安装backtrack 4 final,不需要你另外的磁盘分区、U盘. 下面讲一下安装过程 1. 安装WinGrub/Grub4DOS 从 http://sourceforge.net/projects/grub4dos/ 下载,然后安装,安装好了之后,打开wingrub, 点击Tools/Install Grub, 选择BOOT.ini, 填入”Back Track 4 Final”到Title, 再点击 Install, 这时会自动拷贝GRLDR 到c:\ ,还会创建c:\grub文件夹. 2. 从bt4-final.iso里拷贝/casper and /boot 到c:\ 3. 修改C:\boot\grub\menu.lst. 当你打开文件时已经有一些内容, 但没有find –set-root /GRLDR这句话,所以应该加上。 最终内容应该为:<!– more –> # By default, boot the first entry. default 0 # Boot automatically after 30 secs. timeout 10 splashimage=/boot/grub/bt4.xpm.gz title BackTrack4 … Read more

window live writer wordpress出错

当出现下面的问题时: The response to the metaWeblog.getRecentPosts method received from the blog server was invalid: Invalid response document returned from XmlRpc server 可以用下面的方法解决: 因为wordpress本身的一个bug,在utf-8编码下,在wp-includes文件夹下, xml-rpc返回的格式不正确,缺了三个字节,要修正这个问题,按如下操作即可: 用一个文本编辑工具打开class.ixr.php,查找: $length = strlen($xml); 替换为:<!–more –> $length = strlen($xml)+3; 就可以解决这个问题了!