Base64字符串存在于数据库中,我无法在laravel 9中将Base64字符串转换为html。在线base64到html转换器可以轻松地转换我的base64字符串。
下面是我base64字符串
"PHAgY2xhc3M9Im13LWVtcHR5LWVsdCI+CjwvcD4KPHA+VGhlIDxiPmdyZXkgdGluYW1vdTwvYj4gKDxpPlRpbmFtdXMgdGFvPC9pPikgaXMgYSB0eXBlIG9mIGdyb3VuZCBiaXJkIG5hdGl2ZSB0byBTb3V0aCBBbWVyaWNhLiBGb3VyIHN1YnNwZWNpZXMgYXJlIHJlY29nbmlzZWQuCjwvcD4KCgo8aDI+PHNwYW4gaWQ9IlRheG9ub215Ij5UYXhvbm9teTwvc3Bhbj48L2gyPgo8cD5BbGwgdGluYW1vdSBhcmUgZnJvbSB0aGUgZmFtaWx5IFRpbmFtaWRhZSwgYW5kIGluIHRoZSBsYXJnZXIgc2NoZW1lIGFyZSBhbHNvIHJhdGl0ZXMuIEFsbCByYXRpdGVzIGV2b2x2ZWQgZnJvbSBwcmVoaXN0b3JpYyBmbHlpbmcgYmlyZHMsIGFuZCB0aW5hbW91cyBhcmUgdGhlIGNsb3Nlc3QgbGl2aW5nIHJlbGF0aXZlIG9mIHRoZXNlIGJpcmRzLjwvcD48cD5UaGUgZ3JleSB0aW5hbW91IGhhcyBzZXZlcmFsIHN1YnNwZWNpZXM6CjwvcD4KPHVsPjxsaT48aT5ULiB0LiBsYXJlbnNpczwvaT4gIHdpdGggYSByYW5nZSBpbiB0aGUgbW9udGFuZSBmb3Jlc3RzIG9mIGNlbnRyYWwgQ29sb21iaWEgYW5kIG5vcnRod2VzdGVybiBWZW5lenVlbGEuPC9saT4KPGxpPjxpPlQuIHQuIGtsZWVpPC9pPiB3aXRoIGEgcmFuZ2Ugb2Ygc291dGgtY2VudHJhbCBDb2xvbWJpYSwgZWFzdGVybiBFY3VhZG9yLCBlYXN0ZXJuIFBlcnUsIGVhc3Rlcm4gQm9saXZpYSwgYW5kIHdlc3Rlcm4gQnJhemlsLjwvbGk+CjxsaT48aT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取这个问题
文件=“数据:@文件/html;base64,".base64编码(文件获取内容($base64字符串));
1条答案
按热度按时间n9vozmp41#
只需使用base64_decode()来获取html,如