php修改写入路径
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->
<?php
function getImage($url,$filename="",$ext) {
if(!$url) return false;
$filename=date("dMYHis").$ext;
ob_start();
readfile($url);
$img = ob_get_contents();
ob_end_clean();
$fp2=@fopen($filename, "a");
fwrite($fp2,$img);
fclose($fp2);
return $filename;
}
$link=$_GET['url'];
$ext=$_GET['ext'];
$img=getImage("$link","","$ext");
if($img)
echo "<p>".$img."</p>
<div class="aritcle_card">
<a class="aritcle_card_img" href="/ai/1463">
<img src="https://img.php.cn/upload/ai_manual/000/000/000/175680176337096.png" alt="图改改">
</a>
<div class="aritcle_card_info">
<a href="/ai/1463">图改改</a>
<p>在线修改图片文字</p>
<div class="">
<img src="/static/images/card_xiazai.png" alt="图改改">
<span>455</span>
</div>
</div>
<a href="/ai/1463" class="aritcle_card_btn">
<span>查看详情</span>
<img src="/static/images/cardxiayige-3.png" alt="图改改">
</a>
</div>
<br><a href=".$img.">Enter</a>";
else
echo "false<br />url<br />ext<br />";
?>
PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号