Home >Backend Development >PHP Tutorial > 请问下,这个代码的这行:file_put_contents("url" $url."" FILE_APPEND);提交的东西是保存到什么地方了呢

请问下,这个代码的这行:file_put_contents("url" $url."" FILE_APPEND);提交的东西是保存到什么地方了呢

WBOY
WBOYOriginal
2016-06-13 12:31:01840browse

请教下,这个代码的这行:file_put_contents("url", $url."###", FILE_APPEND);提交的东西是保存到什么地方了呢?
代码的第33行::file_put_contents("url", $url."###", FILE_APPEND);提交的东西是append保存到什么地方了呢?
是追加保存在本源码文件sign.php里了吗?我测试了一下,提交一些内容后我空间里的sign.php文件没有任何变化啊.我做桌面软件的,不会网页编程,php不会.多谢!!

<?php<br />
header("Content-type: text/html; charset=UTF-8");<br />
$url=$_POST["url"];<br />
?><br />
<head><br />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><br />
<title>自动签到平台</title><br />
</head><br />
<body><br />
<center><br />
<h2>自动签到平台</h2><br />
<?php<br />
if($_GET['vi']=='update'){<br />
    $urls=file_get_contents("url");<br />
    $urls=explode("###", $urls);<br />
	<br />
    foreach($urls as $u){<br />
        echo $i."、".file_get_contents($u)."<br/>";<br />
    }<br />
    <br />
    echo "<hr/><font color='green'>任务结束!</font><br/>";<br />
}else{<br />
    echo "<p><form action='sign.php' method='post'><br />
    网址:<br/><br />
    <textarea name='url' rows='7'></textarea><br/><br />
    <input name='vi' type='submit' value='提交'><br />
    </form></p><br />
    <hr/>";<br />
}<br />
<br />
if($_POST['vi']=='提交'){<br />
    if(strstr($url,'http://')){<br />
        file_put_contents("url", $url."###", FILE_APPEND);<br />
        echo "<font color='green'>网址已被保存!系统将于每人凌晨1时自动访问</font><br/>";<br />
    }else{<br />
        echo "<font color='red'>网址保存失败!请检查</font><br/>";<br />
    }<br />
}<br />
?><br />
<hr/><br />
Code By:i<br/><br />
<?php echo date('Y-m-d H:i:s',time());?><br />
</center><br />
</body><br />
</html>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article: ajax 二维数组解决方法 Next article: php的恒量