<?php
//file_put_contents
//内容写入到文件
//函数用于写入文件路径
//参数:('要写入的文件路径','要写入的内容','以什么模式写入')
file_put_contents('./wangru','最近有点冷');
//file_get_contents
//函数把整个文件读入一个字符串中
//file_get_contents('要读取的文件路径')
//例:
echo file_get_contents('./wangru');
//header():函数用于向客户端发送原始的http报头
//下列函数用于让系统接收图片格式
header('content-type:image/gif');
echo file_get_contents('./1.gif');点击 "运行实例" 按钮查看在线实例
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号