當前位置:首頁 » 編程語言 » php圖片文字水印圖片

php圖片文字水印圖片

發布時間: 2022-04-20 20:11:07

A. 用php代碼給圖片加水印

這篇文章主要介紹了用PHP代碼給圖片加水印的相關資料,需要的朋友可以參考下
先找好一張圖片,更名為face.jpeg,創建watermark.php:
?
1
2
3
4
5
6
7
8
9
10
11
12
<?php
/**
*
Created
by
PhpStorm.
*
User:
Administrator
*
Date:
2015/6/29
*
Time:
22:27
*/
$img
=
imagecreatefromjpeg('face.jpeg');//根據已有的JPG創建image
header('Content-type:image/jpeg');//設置mime
type
imagestring($img,5,5,5,'Vito-L',imagecolorallocate($img,255,0,0));//生成水印,imagestring(圖片,字體,位置x,位置y,字元串,顏色)
imagejpeg($img);//輸出圖片
//整幅圖像的左上角為
0,0
效果如下:
以上所述就是本文的全部內容了,希望大家能夠喜歡。

B. php添加文字和圖片水印問題。

//可能是你的編碼設置有問題,在配置文件中設置編碼為UTF-8或者別的,反正和你其它地方編碼統一
header('Content-Type:text/html;charset=utf-8');

C. PHP如何根據圖片色階不同添加水印

在使用php編程的時候, 很多時候需要對上傳的圖片加水印,來確定圖片版權和出處. 但是,一般情況下加水印的位置是圖片的右下角, 但是,不同圖片的色階不同,有時候我們 圖片的水印和圖片本身色階相同,就會造成水印不明顯.
下面這段代碼可以實現自動識別圖片的色階,更加色階差來添加圖片的水印,這樣可以避免水印和圖片色階一樣的弊端.
<?php
function add_wm($nmw_water, $src_file, $output_file, $x, $y) {
if(file_exists($output_file))
return;
$w1 = MagickGetImageWidth($nmw_water);
$h1 = MagickGetImageHeight($nmw_water);
$nmw =NewMagickWand();
MagickReadImage($nmw, $src_file);
// 默認的加水印位置調整
$lt_w = 50;
$lt_h = 50;
if($x == 0){
$w = MagickGetImageWidth($nmw);
$h = MagickGetImageHeight($nmw);
$x = $w;
$y = $h;
}else{
// 根據具體情況調整
$lt_w = 30;
$lt_h = 40;
}
MagickCompositeImage($nmw, $nmw_water, MW_OverCompositeOp, $x - $w1 - $lt_w, $y - $h1 - $lt_h);
MagickWriteImage($nmw, $output_file);
DestroyMagickWand($nmw);
}
// 還是groovy的eachFileRecurse好用啊
function add_wm_recurse($nmw_water, $to_dir, $output_dir, $arr) {
$dp = dir($to_dir);
while($file=$dp->read()){
if($file != '.' && $file != '..'){
if(is_dir($to_dir . '/' . $file)){
mkdir($output_dir . '/' . $file);
add_wm_recurse($nmw_water, $to_dir . '/' . $file, $output_dir . '/' . $file, $arr);
}else{
if(!array_key_exists($to_dir . '/' . $file, $arr)){
continue;
}
$sub_arr = $arr[$to_dir . '/' . $file];
if($sub_arr){
$x = intval($sub_arr[0]);
$y = intval($sub_arr[1]);
add_wm($nmw_water, $to_dir . '/' . $file, $output_dir . '/' . $file, $x, $y);
}
}
}
}
$dp->close();
}
$to_dir = './resized';
$output_dir = './output';
// 這個是我用java的ImageIO遍歷圖片像素獲取的符合褲子顏色的區域的坐標array(posX, posY)
$arr = array(
array(50, 50)
);
$water = './water.png';
$nmw_water =NewMagickWand();
MagickReadImage($nmw_water, $water);
add_wm_recurse($nmw_water, $to_dir, $output_dir, $arr);
DestroyMagickWand($nmw_water);
?>

補充:
PHP圖像處理模塊 MagickWand用法
MagickWand 是一個PHP的模塊,用來訪問 ImageMagick 的圖像處理庫。下面是一個使用 MagicWand 的代碼片段:
$magick_wand=NewMagickWand();
MagickReadImage($magick_wand,'rose.jpg');
$drawing_wand=NewDrawingWand();
DrawSetFont($drawing_wand,"/usr/share/fonts/bitstream-vera/Vera.ttf");
DrawSetFontSize($drawing_wand,20);
DrawSetGravity($drawing_wand,MW_CenterGravity);
$pixel_wand=NewPixelWand();
PixelSetColor($pixel_wand,"white");
DrawSetFillColor($drawing_wand,$pixel_wand);
if (MagickAnnotateImage($magick_wand,$drawing_wand,0,0,0,"Rose") != 0)
{
MagickEchoImageBlob( $magick_wand );
}
else
{
echo MagickGetExceptionString($magick_wand);
}
?>

安裝方法:
1. 下載 php_magickwand_q16_st.dll for 5.2.x
2. 將其放在PHP的擴展目錄
3. 在php.ini文件總增加 extension=php_magickwand_q16_st.dll
4. 重新啟動apache

D. PHP給圖片添加文字水印

請確認C:\WINDOWS\Fonts\simkai.ttf';是否支持中文
或不要轉換
$str = iconv('GB2312','UTF-8',$str);
直接
$str=$str;

E. 關於PHP給圖片添加水印的問題,求大神解答

  1. 加兩文字水印,弄成加兩次水印就行,不過效率就差點。可以考慮加圖片的水印

  2. 你用什麼編輯器?如果是記事本的話很容易出現亂碼問題,網頁是UTF-8了,但是你記事本存儲的卻是GBK。推薦用Editlus 3,網上有注冊版的。

F. 誰有能用的php給圖片加文字水印,最好有使用方法,注意:一定是能用的,功能強不強大另說

<?php

/*PHP圖片加文字水印類庫

QQ:3697578482 傷心的歌

該類庫暫時只支持文字水印,位置為右下角,顏色隨機

調用方法:
1、在需要加水印的文件頂部引入類庫:
include_once 'imageClass.php';
2、聲明新類:
$tpl=new image_fu;
3、給圖片水印提供參數:
$tpl->img(圖片路徑,水印文字,字體路徑,字體大小,字體角度);
比如:$tpl->img('abc.jpg','這是水印文字','ziti.ttf',30,0)

*/

class image_fu{

private $image;
private $img_info;
private $img_width;
private $img_height;
private $img_im;
private $img_text;
private $img_ttf='';
private $img_new;
private $img_text_size;
private $img_jd;

function img($img='',$txt='',$ttf='',$size=12,$jiao=0){
if(isset($img)&&file_exists($img)){//檢測圖片是否存在
$this->image =$img;
$this->img_text=$txt;
$this->img_text_size=$size;
$this->img_jd=$jiao;
if(file_exists($ttf)){
$this->img_ttf=$ttf;
}else{
exit('字體文件:'.$ttf.'不存在!');
}
$this->imgyesno();
}else{
exit('圖片文件:'.$img.'不存在');
}
}

private function imgyesno(){

$this->img_info =getimagesize($this->image);
$this->img_width =$this->img_info[0];//圖片寬
$this->img_height=$this->img_info[1];//圖片高

//檢測圖片類型
switch($this->img_info[2]){
case 1:$this->img_im = imagecreatefromgif($this->image);break;
case 2:$this->img_im = imagecreatefromjpeg($this->image);break;
case 3:$this->img_im = imagecreatefrompng($this->image);break;
default:exit('圖片格式不支持水印');
}

$this->img_text();
}

private function img_text(){

imagealphablending($this->img_im,true);

//設定顏色
$color=imagecolorallocate($this->img_im,rand(0,255),rand(0,255),rand(0,255));
$txt_height=$this->img_text_size;
$txt_jiao=$this->img_jd;
$ttf_im=imagettfbbox($txt_height,$txt_jiao,$this->img_ttf,$this->img_text);
$w = $ttf_im[2] - $ttf_im[6];
$h = $ttf_im[3] - $ttf_im[7];
//$w = $ttf_im[7];
//$h = $ttf_im[8];

unset($ttf_im);

$txt_y =$this->img_height-$h;
$txt_x =$this->img_width-$w;
//$txt_y =0;
//$txt_x =0;

$this->img_new=@imagettftext($this->img_im,$txt_height,$txt_jiao,$txt_x,$txt_y,$color,$this->img_ttf,$this->img_text);

@unlink($this->image);//刪除圖片
switch($this->img_info[2]) {//取得背景圖片的格式
case 1:imagegif($this->img_im,$this->image);break;
case 2:imagejpeg($this->img_im,$this->image);break;
case 3:imagepng($this->img_im,$this->image);break;
default: exit('水印圖片失敗');
}

}

//顯示圖片
function img_show(){echo '<img src="'.$this->image.'" border="0" alt="'.$this->img_text.'" />';}

//釋放內存
private function img_nothing(){
unset($this->img_info);
imagedestroy($this->img_im);
}

}

?>

G. php給圖片加文字水印

arrayimagettftext(resource$image,float$size,float$angle,int$x,int$y,int$color,string$fontfile,string$text)

H. php如何給圖片加文字水印

我知道的有三種,都是使用GD庫的image函數
一種是直接在圖片上寫文字
imagefttext();
一種是帶透明度的水印圖片
image();
還有一種是可以自定義水印圖片透明度的
imagemerge();
你想要什麼效果,可以接著細說

I. php圖片水印代碼問題拜託了各位 謝謝

不顯示的話就是你沒輸出來,請參考以下代碼重新檢查一遍: ------------------------------華麗分割線------------------------------------- <? /* * 功能:PHP圖片水印 (水印支持圖片或文字) * 參數: * $groundImage 背景圖片,即需要加水印的圖片,暫只支持GIF,JPG,PNG格式; * $waterPos 水印位置,有10種狀態,0為隨機位置; * 1為頂端居左,2為頂端居中,3為頂端居右; * 4為中部居左,5為中部居中,6為中部居右; * 7為底端居左,8為底端居中,9為底端居右; * $waterImage 圖片水印,即作為水印的圖片,暫只支持GIF,JPG,PNG格式; * $waterText 文字水印,即把文字作為為水印,支持ASCII碼,不支持中文; * $fontSize 文字大小,值為1、2、3、4或5,默認為5; * $textColor 文字顏色,值為十六進制顏色值,默認為#CCCCCC(白灰色); * $fontfile ttf字體文件,即用來設置文字水印的字體。使用windows的用戶在系統盤的目錄中 * 搜索*.ttf可以得到系統中安裝的字體文件,將所要的文件拷到網站合適的目錄中, * 默認是當前目錄下arial.ttf。 * $xOffset 水平偏移量,即在默認水印坐標值基礎上加上這個值,默認為0,如果你想留給水印留 * 出水平方向上的邊距,可以設置這個值,如:2 則表示在默認的基礎上向右移2個單位,-2 表示向左移兩單位 * $yOffset 垂直偏移量,即在默認水印坐標值基礎上加上這個值,默認為0,如果你想留給水印留 * 出垂直方向上的邊距,可以設置這個值,如:2 則表示在默認的基礎上向下移2個單位,-2 表示向上移兩單位 * 返回值: * 0 水印成功 * 1 水印圖片格式目前不支持 * 2 要水印的背景圖片不存在 * 3 需要加水印的圖片的長度或寬度比水印圖片或文字區域還小,無法生成水印 * 4 字體文件不存在 * 5 水印文字顏色格式不正確 * 6 水印背景圖片格式目前不支持 * 修改記錄: * * 注意:Support GD 2.0,Support FreeType、GIF Read、GIF Create、JPG 、PNG * $waterImage 和 $waterText 最好不要同時使用,選其中之一即可,優先使用 $waterImage。 * 當$waterImage有效時,參數$waterString、$stringFont、$stringColor均不生效。 * 加水印後的圖片的文件名和 $groundImage 一樣。 * 作者:高西林 * 日期:2007-4-28 * 說明:本程序根據longware的程序改寫而成。 */ function imageWaterMark($groundImage,$waterPos=0,$waterImage="",$waterText="",$fontSize=12,$textColor="#CCCCCC", $fontfile='./arial.ttf',$xOffset=0,$yOffset=0) { $isWaterImage = FALSE; //讀取水印文件 if(!empty($waterImage) && file_exists($waterImage)) { $isWaterImage = TRUE; $water_info = getimagesize($waterImage); $water_w = $water_info[0];//取得水印圖片的寬 $water_h = $water_info[1];//取得水印圖片的高 switch($water_info[2]) { //取得水印圖片的格式 case 1:$water_im = imagecreatefromgif($waterImage);break; case 2:$water_im = imagecreatefromjpeg($waterImage);break; case 3:$water_im = imagecreatefrompng($waterImage);break; default:return 1; } } //讀取背景圖片 if(!empty($groundImage) && file_exists($groundImage)) { $ground_info = getimagesize($groundImage); $ground_w = $ground_info[0];//取得背景圖片的寬 $ground_h = $ground_info[1];//取得背景圖片的高 switch($ground_info[2]) { //取得背景圖片的格式 case 1:$ground_im = imagecreatefromgif($groundImage);break; case 2:$ground_im = imagecreatefromjpeg($groundImage);break; case 3:$ground_im = imagecreatefrompng($groundImage);break; default:return 1; } } else { return 2; } //水印位置 if($isWaterImage) { //圖片水印 $w = $water_w; $h = $water_h; $label = "圖片的"; } else { //文字水印 if(!file_exists($fontfile))return 4; $temp = imagettfbbox($fontSize,0,$fontfile,$waterText);//取得使用 TrueType 字體的文本的范圍 $w = $temp[2] - $temp[6]; $h = $temp[3] - $temp[7]; unset($temp); } if( ($ground_w < $w) || ($ground_h < $h) ) { return 3; } switch($waterPos) { case 0://隨機 $posX = rand(0,($ground_w - $w)); $posY = rand(0,($ground_h - $h)); break; case 1://1為頂端居左 $posX = 0; $posY = 0; break; case 2://2為頂端居中 $posX = ($ground_w - $w) / 2; $posY = 0; break; case 3://3為頂端居右 $posX = $ground_w - $w; $posY = 0; break; case 4://4為中部居左 $posX = 0; $posY = ($ground_h - $h) / 2; break; case 5://5為中部居中 $posX = ($ground_w - $w) / 2; $posY = ($ground_h - $h) / 2; break; case 6://6為中部居右 $posX = $ground_w - $w; $posY = ($ground_h - $h) / 2; break; case 7://7為底端居左 $posX = 0; $posY = $ground_h - $h; break; case 8://8為底端居中 $posX = ($ground_w - $w) / 2; $posY = $ground_h - $h; break; case 9://9為底端居右 $posX = $ground_w - $w; $posY = $ground_h - $h; break; default://隨機 $posX = rand(0,($ground_w - $w)); $posY = rand(0,($ground_h - $h)); break; } //設定圖像的混色模式 imagealphablending($ground_im, true); if($isWaterImage) { //圖片水印 image($ground_im, $water_im, $posX + $xOffset, $posY + $yOffset, 0, 0, $water_w,$water_h);//拷貝水印到目標文件 } else {//文字水印 if( !empty($textColor) && (strlen($textColor)==7) ) { $R = hexdec(substr($textColor,1,2)); $G = hexdec(substr($textColor,3,2)); $B = hexdec(substr($textColor,5)); } else { return 5; } imagettftext ( $ground_im, $fontSize, 0, $posX + $xOffset, $posY + $h + $yOffset, imagecolorallocate($ground_im, $R, $G, $B), $fontfile, $waterText); } //生成水印後的圖片 @unlink($groundImage); switch($ground_info[2]) {//取得背景圖片的格式 case 1:imagegif($ground_im,$groundImage);break; case 2:imagejpeg($ground_im,$groundImage);break; case 3:imagepng($ground_im,$groundImage);break; default: return 6; } //釋放內存 if(isset($water_info)) unset($water_info); if(isset($water_im)) imagedestroy($water_im); unset($ground_info); imagedestroy($ground_im); // return 0; } ?> <?php ////////////////////// if(isset($_POST['submit'])) { if(isset($_FILES) && !empty($_FILES['userfile']) && $_FILES['userfile']['size']>0) { $uploadfile = "./".time()."_".$_FILES['userfile']['name']; if (($_FILES['userfile']['tmp_name'], $uploadfile)) { if($_POST['watertype'] == 0) { $msg = "returnvalue=".imageWaterMark($uploadfile,$_POST['waterpos'],"",$_POST['watercontent'],$_POST['fontsize'],$_POST['fontcolor'],$_POST['fontfile'],$_POST['xoffset'],$_POST['yoffset']); } else { $msg = "returnvalue=".imageWaterMark($uploadfile,$_POST['waterpos'],$_POST['watercontent']); } echo "<img src=\"".$uploadfile."\" border=\"0\">"; } else { $msg = "Fail!"; } } } ?> <html> <head> <meta http-equiv=content-type content="text/html; charset=utf-8"> <title>水印函數測試</title> </head> <body> <form enctype="multipart/form-data" method="POST"> <table> <tr> <td><input name="watertype" type="radio" value=0 checked>文字水印<input type="radio" name="watertype" value=1>水印圖片</td> </tr> <tr> <td><input name="watercontent" value="blog.csdn.net/alin0725">水印文字內容或水印圖片文件名</td> </tr> <tr> <td><input name="fontcolor" value="#CCCCCC">文字水印顏色</td> </tr> <tr> <td><input name="fontsize" value="10">文字字體大小</td> </tr> <tr> <td><input name="fontfile" value="./arial.ttf">文字字體文件ttf格式</td> </tr> <tr> <td>水印位置<input name="waterpos" value=0> 0為隨機,其他位置值如下: <table> <tr> <td>1</td> <td>2</td> <td>3</td> </tr> <tr> <td>4</td> <td>5</td> <td>6</td> </tr> <tr> <td>7</td> <td>8</td> <td>9</td> </tr> </table> </td> </tr> <tr> <td>x方向上的偏移量<input name="xoffset" value=0>y方向上的偏移量<input name="yoffset" value=0> </td> <tr> <tr> <td>背景圖片: <input name="userfile" type="file"> </td> </tr> <tr> <td><input type="submit" name="submit" value="提交"></td> </tr> <tr> <td>消息:<?php echo $msg; ?></td> </tr> </table> </form> </body> </html>

J. PHP如何對上傳的圖片加水印

這個要用到PHP的GD擴展,用這個擴展庫可以給圖片加水印。
參考一下這段代碼:
<?php
/*
* 功能:PHP圖片水印 (水印支持圖片或文字)
* 參數:
* $groundImage 背景圖片,即需要加水印的圖片,暫只支持GIF,JPG,PNG格式;
* $waterPos 水印位置,有10種狀態,0為隨機位置;
* 1為頂端居左,2為頂端居中,3為頂端居右;
* 4為中部居左,5為中部居中,6為中部居右;
* 7為底端居左,8為底端居中,9為底端居右;
* $waterImage 圖片水印,即作為水印的圖片,暫只支持GIF,JPG,PNG格式;
* $waterText 文字水印,即把文字作為為水印,支持ASCII碼,不支持中文;
* $textFont 文字大小,值為1、2、3、4或5,默認為5;
* $textColor 文字顏色,值為十六進制顏色值,默認為#FF0000(紅色);
*
* 注意:Support GD 2.0,Support FreeType、GIF Read、GIF Create、JPG 、PNG
* $waterImage 和 $waterText 最好不要同時使用,選其中之一即可,優先使用 $waterImage。
* 當$waterImage有效時,參數$waterString、$stringFont、$stringColor均不生效。
* 加水印後的圖片的文件名和 $groundImage 一樣。
* 作者:longware @ 2004-11-3 14:15:13
*/
function imageWaterMark($groundImage,$waterPos=0,$waterImage=」",$waterText=」",$textFont=5,$textColor=」#FF0000″)
{
$isWaterImage = FALSE;
$formatMsg = 「暫不支持該文件格式,請用圖片處理軟體將圖片轉換為GIF、JPG、PNG格式。」;
//讀取水印文件
if(!emptyempty($waterImage) && file_exists($waterImage))
{
$isWaterImage = TRUE;
$water_info = getimagesize($waterImage);
$water_w = $water_info[0];//取得水印圖片的寬
$water_h = $water_info[1];//取得水印圖片的高
switch($water_info[2])//取得水印圖片的格式
{
case 1:$water_im = imagecreatefromgif($waterImage);break;
case 2:$water_im = imagecreatefromjpeg($waterImage);break;
case 3:$water_im = imagecreatefrompng($waterImage);break;
default:die($formatMsg);
}
}
//讀取背景圖片
if(!emptyempty($groundImage) && file_exists($groundImage))
{
$ground_info = getimagesize($groundImage);
$ground_w = $ground_info[0];//取得背景圖片的寬
$ground_h = $ground_info[1];//取得背景圖片的高
switch($ground_info[2])//取得背景圖片的格式
{
case 1:$ground_im = imagecreatefromgif($groundImage);break;
case 2:$ground_im = imagecreatefromjpeg($groundImage);break;
case 3:$ground_im = imagecreatefrompng($groundImage);break;
default:die($formatMsg);
}
}
else
{
die(」需要加水印的圖片不存在!」);
}
//水印位置
if($isWaterImage)//圖片水印
{
$w = $water_w;
$h = $water_h;
$label = 「圖片的」;
}
else//文字水印
{
$temp = imagettfbbox(ceil($textFont*5),0,」./cour.ttf」,$waterText);//取得使用 TrueType 字體的文本的范圍
$w = $temp[2] - $temp[6];
$h = $temp[3] - $temp[7];
unset($temp);
$label = 「文字區域」;
}
if( ($ground_w<$w) || ($ground_h<$h) )
{
echo 「需要加水印的圖片的長度或寬度比水印」.$label.」還小,無法生成水印!」;
return;
}
switch($waterPos)
{
case 0://隨機
$posX = rand(0,($ground_w - $w));
$posY = rand(0,($ground_h - $h));
break;
case 1://1為頂端居左
$posX = 0;
$posY = 0;
break;
case 2://2為頂端居中
$posX = ($ground_w - $w) / 2;
$posY = 0;
break;
case 3://3為頂端居右
$posX = $ground_w - $w;
$posY = 0;
break;
case 4://4為中部居左
$posX = 0;
$posY = ($ground_h - $h) / 2;
break;
case 5://5為中部居中
$posX = ($ground_w - $w) / 2;
$posY = ($ground_h - $h) / 2;
break;
case 6://6為中部居右
$posX = $ground_w - $w;
$posY = ($ground_h - $h) / 2;
break;
case 7://7為底端居左
$posX = 0;
$posY = $ground_h - $h;
break;
case 8://8為底端居中
$posX = ($ground_w - $w) / 2;
$posY = $ground_h - $h;
break;
case 9://9為底端居右
$posX = $ground_w - $w;
$posY = $ground_h - $h;
break;
default://隨機
$posX = rand(0,($ground_w - $w));
$posY = rand(0,($ground_h - $h));
break;
}
//設定圖像的混色模式
imagealphablending($ground_im, true);
if($isWaterImage)//圖片水印
{
image($ground_im, $water_im, $posX, $posY, 0, 0, $water_w,$water_h);//拷貝水印到目標文件
}
else//文字水印
{
if( !emptyempty($textColor) && (strlen($textColor)==7) )
{
$R = hexdec(substr($textColor,1,2));
$G = hexdec(substr($textColor,3,2));
$B = hexdec(substr($textColor,5));
}
else
{
die(」水印文字顏色格式不正確!」);
}
imagestring ( $ground_im, $textFont, $posX, $posY, $waterText, imagecolorallocate($ground_im, $R, $G, $B));
}
//生成水印後的圖片
@unlink($groundImage);
switch($ground_info[2])//取得背景圖片的格式
{
case 1:imagegif($ground_im,$groundImage);break;
case 2:imagejpeg($ground_im,$groundImage);break;
case 3:imagepng($ground_im,$groundImage);break;
default:die($errorMsg);
}
//釋放內存
if(isset($water_info)) unset($water_info);
if(isset($water_im)) imagedestroy($water_im);
unset($ground_info);
imagedestroy($ground_im);
}
//—————————————————————————————
$id=$_REQUEST['id'];
$num = count($_FILES['userfile']['name']);
print_r($_FILES['userfile']);
print_r($_FILES['userfile']['name']);
echo $num;
echo 「<bR>」;
if(isset($id)){
for($i=0;$i<$id;$i++){
if(isset($_FILES) && !emptyempty($_FILES['userfile']) && $_FILES['userfile']['size']>0)
{
$uploadfile = 「./」.time().」_」.$_FILES['userfile'][name][$i];
echo 「<br>」;
echo $uploadfile;
if (($_FILES['userfile']['tmp_name'][$i], $uploadfile))
{
echo 「OK<br>」;
//文字水印
//imageWaterMark($uploadfile,5,」",」www.lvye.info" target="_blank">http://www.lvye.info」,5,」#cccccc「);
//圖片水印
$waterImage=」logo_ok1.gif」;//水印圖片路徑
imageWaterMark($uploadfile,9,$waterImage);
echo 「<img src=\」".$uploadfile.」\」 border=\」0\」>」;
}
else
{
echo 「Fail<br>」;
}
}
}
}
?>
<form enctype=」multipart/form-data」 method=」POST」>
<?php
for($a=0;$a<$id;$a++){
echo 「文件: <input name=\」userfile[]\」 type=\」file\」><br>」;
}
?>
<input type=」submit」 value=」上傳」>
</form>

熱點內容
內置存儲卡可以拆嗎 發布:2025-05-18 04:16:35 瀏覽:335
編譯原理課時設置 發布:2025-05-18 04:13:28 瀏覽:378
linux中進入ip地址伺服器 發布:2025-05-18 04:11:21 瀏覽:612
java用什麼軟體寫 發布:2025-05-18 03:56:19 瀏覽:32
linux配置vim編譯c 發布:2025-05-18 03:55:07 瀏覽:107
砸百鬼腳本 發布:2025-05-18 03:53:34 瀏覽:944
安卓手機如何拍視頻和蘋果一樣 發布:2025-05-18 03:40:47 瀏覽:739
為什麼安卓手機連不上蘋果7熱點 發布:2025-05-18 03:40:13 瀏覽:803
網卡訪問 發布:2025-05-18 03:35:04 瀏覽:511
接收和發送伺服器地址 發布:2025-05-18 03:33:48 瀏覽:371