Changeset 1319905
- Timestamp:
- 01/02/2016 02:09:37 PM (10 years ago)
- File:
-
- 1 edited
-
thunder-port/trunk/thunder_port.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
thunder-port/trunk/thunder_port.php
r1319903 r1319905 147 147 // 1. using file 148 148 // $list = file_get_contents(plugin_dir_path( __FILE__ ) . "list/allplugins.json"); 149 $list_ori = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/allplugins.json"); 150 $list = wp_remote_retrieve_body( $list_ori ); 149 $list = file_get_contents("list/allplugins.json"); 150 // $list_ori = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/allplugins.json"); 151 // $list = wp_remote_retrieve_body( $list_ori ); 151 152 152 153 $return = json_decode($list); … … 208 209 // 1. using files 209 210 // $html2 = file_get_contents(plugin_dir_path( __FILE__ ) . "list/exist.json"); 210 $html2_ori = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/exist.json"); 211 $html2 = wp_remote_retrieve_body( $html2_ori ); 211 $html2 = file_get_contents("list/exist.json"); 212 // $html2_ori = wp_remote_get(plugin_dir_path( __FILE__ ) . "list/exist.json"); 213 // $html2 = wp_remote_retrieve_body( $html2_ori ); 212 214 $string2 = json_decode($html2); 213 215 … … 549 551 foreach($thelist as $list) { 550 552 551 // $json = file_get_contents(plugin_dir_path( __FILE__ ).'json/'.$list); 552 $json_ori = wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list); 553 $json = wp_remote_retrieve_body( $json_ori ); 553 $json = file_get_contents(plugin_dir_path( __FILE__ ).'json/'.$list); 554 $json = file_get_contents('json/'.$list); 555 // $json_ori = wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list); 556 // $json = wp_remote_retrieve_body( $json_ori ); 554 557 $string = json_decode($json); 555 558 $string = $string[0]; … … 1573 1576 1574 1577 // $json = file_get_contents(''.plugin_dir_url( __FILE__ ) . '/json/'.$list); 1578 $json = file_get_contents('json/'.$list); 1575 1579 $json_ori = wp_remote_get(plugin_dir_path( __FILE__ ).'json/'.$list); 1576 1580 $json = wp_remote_retrieve_body( $json_ori );
Note: See TracChangeset
for help on using the changeset viewer.