我也用smarty和xajax
在smarty對象注冊fread_data($filename)函數,然後就可以在模板中用{fread_data}得到$content,
messages函数就是php函數,怎麼寫都行,在xajax對象注冊這個函數,提交form時使用這個函數處理就行了,