public function getTmpPathByContent($content) { static $tmpFile = null; $tmpFile = tmpfile(); fwrite($tmpFile, $content); $tempPemPath = stream_get_meta_data($tmpFile); return $tempPemPath['uri']; }
调用实例
$content ='222';/证书里面的内容 $path =$this->getTmpPathByContent($content); var_dump(file_get_contents($path));//读取路径里面的内容
标签:tmpFile,getTmpPathByContent,证书,微信,tempPemPath,content,CURL From: https://www.cnblogs.com/langzibht/p/16744049.html