首页 > php代码 > php 简单file_get_contents fopen教程

php 简单file_get_contents fopen教程

php 简单file_get_contents fopen教程

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<?php
$content =file_get_contents('http://www.phprm.com/');
if( !empty( $content ) ){
    $info = fopen('down.txt','w+');
    fwrite($info,$content);
    fclose($info);
    print_r(file('down.txt') );
}
?>
</body>
</html>


本文地址:http://www.phprm.com/code/0a4343393458bed98302bdbcb857d2fc.html

转载随意,但请附上文章地址:-)

标签:none

发表留言