Tv-ue 。\r$file_array = parse_ini_file ( " holy_ grail . ini" , t r ue );\rprin t —r $file_ array;\r并且您将获得以下输出 :\rArray\r[person al informa t ion) => Array\r[name] => King Ar t hur\r[quest ] => To seek the Holy Gr a il\r[favo rite c o l o r ] => Blu e\r[more stu ff) => Array\r上 r (\r[Samu el Cl emens ] => Mark Twain\r[Car y n Johnson] => Whoopi Goldberg\r上 q )\r- <?php\r$file_pa七h = " tes七 . t x t " ;\r土 f ( f il e_e x ists ( $file_path )) {\r勺 $ fp = fopen ($file_path, " r '' );\r$str = "" ;\r$buffer = 1 024 ; //每次读取 1024 字节\rwhile ( ! feof ( $fp )){ //循环读取 , 直至读取完整个文件\r$str . = fread ( $fp, $buffer) ;\r' }\r$str = s 七 r_replace ( " \r\n " , " <br /> " , $str) ;\recho $str;\r?>