How do I generate a pdf-file from a binary file?
问题 How do I generate a pdf-file from a binary file retrieved from database in php5? It comes base64 encoded, and I just decoded it, but don't know what to do next... 回答1: The binary data is simply the actual file , or rather the important contents of that file, just without file name. $base64 = /* some base64 encoded data fetched from somewhere */; $binary = base64_decode($base64); And there you have the file data/contents of the file in the $binary variable. From here, it depends on what you