PHP获取指定文件内容!这里用来获取字符串
1 2 3 4 5 6 7 | //PHP获取指定文件内容 $filename365 =WP_PLUGIN_DIR. "/click/ad_click_count/365.txt" ; //服务器绝对路径 if ( file_exists ( $filename365 )){ //判断文件存在 $ad_click_365 = intval ( file_get_contents ( $filename365 )); } else { //不存在则返回0 $ad_click_365 = "0" ; } |