php - neither curl nor file_get_contents returns something -
i have php works on every server tried except one.
if (function_exists('curl_version')){ $ch = curl_init($base_path); curl_setopt($ch, curlopt_timeout, 5); curl_setopt($ch, curlopt_connecttimeout, 5); curl_setopt($ch, curlopt_returntransfer, true); $data = curl_exec($ch); curl_close($ch); } else if( ini_get('allow_url_fopen') ) { $data = file_get_contents($base_path); } else{ $data =0; echo 'nothing installed'; } the thing both curl , allow_url_open configured properly.
do have idea wrong in server?
thank you.
well, since 've spend few hours, did using javascript in order not lose time.
Comments
Post a Comment