PHP file_get_contents() 函数
2016-10-31 23:01:47
•
阅读
打赏
函数原型
/**
* 把整个文件读入一个字符串中,二进制安全
* @link http://php.net/manual/en/function.file-get-contents.php
* @param string $filename 要读的文件名或URL
* @param int $flags [optional] 如果要在 include_path(在 php.ini 中)中搜索文件,需设置该参数为 '1'。
* @param resource $context [optional] 文件句柄的环境。context 是一套可以修改流的行为的选项。若使用 NULL,则忽略
* @param int $offset [optional] 在文件中开始读取的位置
* @param int $maxlen [optional] 读取的字节数
* @return string 返回读取的数据,失败返回 false
* @since 4.3.0
* @since 5.0
*/
function file_get_contents ($filename, $flags = null, $context = null, $offset = null, $maxlen = null) {}
函数示例
<?php
echo file_get_contents("test.txt");
?>
相关推荐
深度学习 -- 损失函数
深度残差网络(Deep Residual Networks (ResNets))
深度学习 -- 激活函数
神经网络训练 -- 调整学习速率
生成对抗网络(GAN)改进与发展
生成对抗网络(GAN)优点与缺点
生成对抗网络(GAN)的训练
生成对抗网络(GAN)基本原理
生成模型与判别模型