<?php
/**************************************************************
參數(shù)說明:
$max_file_size : 上傳文件大小限制, 單位BYTE
$destination_folder : 上傳文件路徑
$watermark : 是否附加水印(1為加水印,其他為不加水印);
使用說明:
1. 將PHP.INI文件里面的"extension=php_gd2.dll"一行前面的;號去掉,因為我們要用到GD庫;
2. 將extension_dir =改為你的php_gd2.dll所在目錄;
**************************************************************/
//上傳文件類型列表
$uptypes=array(
'image/jpg',
'image/jpeg',
'image/png',
'image/pjpeg',
'image/gif',
'image/bmp',
'image/x-png'
);
$max_file_size=2000000; //上傳文件大小限制, 單位BYTE
$destination_folder="uploadimg/"; //上傳文件路徑
$watermark=1; //是否附加水印(1為加水印,其他為不加水印);
$watertype=1; //水印類型(1為文字,2為圖片)
$waterposition=1; //水印位置(1為左下角,2為右下角,3為左上角,4為右上角,5為居中);
$waterstring="http://www.mop8.com/"; //水印字符串
$waterimg="xplore.gif"; //水印圖片
$imgpreview=1; //是否生成預覽圖(1為生成,其他為不生成);
$imgpreviewsize=1/1; //縮略圖比例
?>
<html>
<head>
<title>圖片打水印程序演示!WWW.MOP8.COM</title>
<style type="text/css">
<!--
body
{
font-size: 9pt;
}
input
{
background-color: #66CCFF;
border: 1px inset #CCCCCC;
}
-->
</style>
</head>
<body>
<center>
<form enctype="multipart/form-data" method="post" name="upform">
上傳文件:
<input name="upfile" type="file">
<input type="submit" value="上傳"><P>