Changeset 485547
- Timestamp:
- 01/06/2012 09:42:50 AM (14 years ago)
- Location:
- my-record-collection/trunk
- Files:
-
- 2 edited
-
js/mrc_scripts.js (modified) (1 diff)
-
mrc_import_admin.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
my-record-collection/trunk/js/mrc_scripts.js
r482765 r485547 80 80 values,function(){ 81 81 alert(mrc_loc.saveMsg); 82 $('.mrca_wrapper').eq(3).show(); 82 83 }); 83 84 } -
my-record-collection/trunk/mrc_import_admin.php
r482765 r485547 125 125 126 126 function get_file_from_url($src){ 127 // returns file content 128 return file_get_contents($src); 127 128 $curl = function_exists('curl_version') ? true : false ; 129 $fgc = file_get_contents(__FILE__) ? true : false; 130 131 if($curl){ 132 // Download file 133 $curl = curl_init($src); 134 curl_setopt($curl, CURLOPT_HEADER, 0); // ignore any headers 135 ob_start(); // use output buffering so the contents don't get sent directly to the browser 136 curl_exec($curl); // get the file 137 curl_close($curl); 138 $file = ob_get_contents(); // save the contents of the file into $file 139 ob_end_clean(); // turn output buffering back off 140 return $file; 141 }else if($fgc){ 142 // returns file content 143 return file_get_contents($src); 144 } 129 145 } 130 146
Note: See TracChangeset
for help on using the changeset viewer.