php 图片上传类代码(3)


<?php
$annexFolder = "annex";
$smallFolder = "smallimg";
$markFolder = "mark";
$includeFolder = "include";
require("./".$includeFolder."/upfile.php");
$img = new UPImages($annexFolder,$smallFolder,$includeFolder);
$text = array("www.jb51.net","all rights reserved");
if(@$_GET["go"]) {
$photo = $img->upLoad("upfile");
$img->maxWidth = $img->maxHeight = 350;//设置生成水印图像值
$img->toFile = true;
$newSmallImg = $img->smallImg($photo);
$newMark = $img->waterMark($photo,$text);
echo "<img src='"https://www.jb51.net/article/.$newSmallImg."'><br><br>";
echo "<img src='"https://www.jb51.net/article/.$newMark."'><br><br>";
echo "<a href='https://www.jb51.net/article/test.php'>继续上传</a>";
} else {
?>
<form method="post" action="./test.php?go=go" enctype="multipart/form-data">
<input type="file"><br><br>
<input type="submit" value="上传">
</form>
<?php
}
?>

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/7d84fa7b1f373e7df6e503fb816504db.html