// archives

execphp

This tag is associated with 1 posts

讓 Widgets 也能執行 PHP Code

這篇的內容主要是從「Fun with Widgets」這篇節錄出來,裡面到底談了些什麼,想了解的人就去點那個連結看看吧!在這我只用簡單的方式提一下,要怎麼做才能用 WordPress 內建的 Widgets 也能執行 PHP Code。
為了配合作者的寫的 ExecPHP 這隻 Plugin,他建議把原來的 Widgets.php 給替換掉。作法很簡單,把 widget.php 下載儲存到 $WPDIR/wp-include/ 這,蓋過原來的 widgets.php 就行了。
接著下載 execphp.zip 到 $WPDIR/wp-content/plugins 且安裝它。這樣你就能在 Presentation -> Widgets 裡找到能使用 PHP 的 module,也能快樂的使用 PHP Code 啦!