0
在我的數組中,我有非常長的變量用作安全令牌,以防止沒有權限訪問PHP服務器的人員。 但是,如果變量通過安全牆,我希望能夠記錄數據以檢查不良動作,但似乎無法找到排除某些變量的方法,以防止我的日誌文件太大並頻繁旋轉。PHP json_encode();排除數組
logissue("User ".$authname." is now preforming ".json_encode($data));
收益並記錄這個龐大的數據大塊..
66.***.***.** 2015/08/03 06:28:52 User Nickoplier is now preforming {"Validate":"[email protected]*au8c8.....","Action":"message","auth":":ZzWh[a....","Parameter1":"2933***","Parameter2":"hello :D","Parameter3":"just a test"}
是否可以排除日誌「驗證」和「權威性」?
注:''unset' '刪除那個條目,所以確保你以後不需要它們 – jmattheis