PHP文件读写,Base64编解码

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/fengsheng5210/article/details/80997002

PHP读写文件

//读取文件流
$fileData = file_get_contents("aaa.png");
//将文件写入本地
file_put_contents("bbb.png", $fileData);

Base64编解码

d a t a = b a s e 64 e n c o d e ( data); //Base64编码
d a t a = u r l e n c o d e ( data); //url编码,过滤空格等字符

base64_decode($data); //Base64解码

猜你喜欢

转载自blog.csdn.net/fengsheng5210/article/details/80997002