更新日期:2014-09-03

wp_upload_dir() 這個函數可以查詢目前圖片資料夾相關設定值,對於圖片有出現問題相當方便查詢,它是回傳一個陣列。

 

相關內容如下:

array(6) {
[“path”]=> string(71) “/path/www/wp-content/images/2014/09”
[“url”]=> string(43) “http://www.abc.com/wp-content/images/2014/09”
[“subdir”]=> string(8) “/2014/09”
[“basedir”]=> string(63) “/path/www/wp-content/images”
[“baseurl”]=> string(35) “http://www.abc.com/wp-content/images”
[“error”]=> bool(false)
}