刊登了 PlayStation 模擬器的文章
Posted on 2009-01-28 • (0)
文章鏈結
整整三年前寫的文章,可說是在 LinuxPilot 刊登的文章之中比較費時費力的一篇。剛才修整好格式和圖片,放上自己的網站。但不做也算了,一做就發覺大量資料已經過時 (特別是找地方下載),畢竟是三年前,沒辦法。算幸運了,(Continue reading…)
Windows Process Execution on PHP with Double Quotes
Posted on 2009-01-19 • (0)
I had a so-called “poll” on Win32 PHP (chinese only), which actually was simply a nag of problems writing code on PHP with cross-platform support (Windows and Linux are in my mind), especially when dealing with file system and command execution — without telling in detail. The complaint had been well hidden in another blog post, but since I don’t want to dive into unconstructive criticism, I just refrain from posting the whole thing here without digging into detail. Until now. That’s lucky, as some more information is revealed, and the situation is not as crappy as I expected. Here goes the first one.
Problem executing commands with more than 2 double quotes
The most frequently used command execution functions in PHP include exec(), system() and so on. They have a common problem: no more than 2 double quotes allowed. For example:
<?php system('"C:\Program Files\ImageMagick\display.exe" "C:\Document and Settings\user\Great Pic.jpg"'); ?>
Such commands are actually pretty common, with space in program path as well as arguments that followed. Regardless of program execution privilege or whatever, the system() itself already fails.
People used to know this for 2 years or more, yet no cure exists. Funny schemes were invented to circumvent such problem, there are at least 2 on PHP website comments:
[......]
The crown jewel of over-engineering
Posted on 2008-09-04 • (0)
If there is a warning message shown inside WordPress admin interface, I’m not quite sure what I would do (maybe directly modify the code to disa[......]
So long, Quarry
Posted on 2008-08-12 • (0)
WordPress plugin: 密碼提示
Posted on 2008-08-11 • (0)
反正是睡不着,所以快手地寫了個甚為簡單的 WordPress plugin,是在有密碼保護的文章中加上密碼提示的。之前嘗試貼出有密碼保護的文章時,要在另一個 post 給予提示,頗為不方便。這個 plugin 已經想做很久了,但一直沒有下定決心,趁這點點空閒寫了出來,(Continue reading…)