跳转到主要内容
learningxm 提交于 3 March 2013

新浪微博的获取头像图片,nemo分享:

if(!empty($data['pic_url')){ $dir = 'public://avatar'; file_prepare_directory($dir,FILE_CREATE_DIRECTORY); $file_temp = system_retrieve_file($data['pic_url'],$dir,TURE); $edit['field_avatar']=array(   'und' => array(     '0'=> array(     'fid' = $file_temp->fid,     'filename' = $file_temp->filename,     'filemime' = $file_temp->filemime,     'uri' = $file_temp->uri,     'status' =>1        )     )   ); } user_save($account,$edit);
articles