Adding watermark to php pictures and adding watermark to uploaded pictures php class_PHP tutorial

WBOY
Release: 2016-07-21 15:38:29
Original
1050 people have browsed it

When a regular website needs to upload pictures, it often needs to add its own website's LOGO watermark to the pictures. So how to implement this step? First, let us understand the principle of watermarking PHP images.
Create a graphic by determining the file type, then copy it to the originally created graphic, fill in and create a rectangle, ready to be written to imagestring() or to determine the watermark type in the original image program: First, string , the other is to add a graphics object on top. The following is a reprint of the PHP image with watermark!

Parameter description:

$max_file_size: upload file size limit, unit BYTE
$destination_folder: upload file path
$watermark: whether to attach a watermark (1 means adding watermark, others (To not add watermark);

Instructions for adding watermark to PHP images:
1. Remove the ; sign in front of the "extension=php_gd2.dll" line in the PHP.INI file, because we need to use it GD library;
2. Change extension_dir = to the directory where your php_gd2.dll is located;
3. http://www.jb51.net/list/list_15_1.htm
Code for watermarking PHP images Example:

Copy code The code is as follows:

//Upload file type list
$uptypes=array(
'image/jpg',
'image/jpeg',
'image/png',
'image/pjpeg',
'image/gif',
'image/bmp',
'image/x-png'
);
$max_file_size=2000000; //Upload File size limit, unit BYTE
$destination_folder="uploadimg/"; //Upload file path
$watermark=1; //Whether to attach a watermark (1 means adding watermark, others means not adding watermark);
$watertype=1; //Watermark type (1 is text, 2 is picture)
$waterposition=1; //Watermark position (1 is the lower left corner, 2 is the lower right corner
, 3 is the upper left corner, 4 is the upper right corner, 5 is in the center);
$waterstring="
http://www.xplore.cn/< ;/A>"; //Watermark string
$waterimg="xplore.gif"; //Watermark image
$imgpreview=1; //Whether to generate a preview image (1 means generated, others will not be generated) );
$imgpreviewsize=1/2; //Thumbnail ratio
?>


ZwelL image uploader< /title> <br><style type="text/css"> <br><!-- <BR>body <BR>{ <BR>font-size: 9pt; <BR>} <BR> input <BR>{ <BR>background-color: #66CCFF; <BR>border: 1px inset #CCCCCC; <BR>} <BR>--> <br></style> <br></ head> <br><body> <br><form enctype="multipart/form-data" <BR>method="post" name="upform"> <br>Upload file: <br>< input name="upfile" type="file"> <br><input type="submit" value="Upload"><br> <br>The file types allowed to be uploaded are:<?=implode (', ',$uptypes)?> <br></form> <br><?php <BR>if ($_SERVER['REQUEST_METHOD'] == 'POST') <BR>{ <BR>if (!is_uploaded_file($_FILES["upfile"] <BR>[tmp_name])) <BR>//Whether the file exists<BR>{ <BR>echo "The picture does not exist!"; <BR>exit; <BR>} <BR>$file = $_FILES["upfile"]; <BR>if($max_file_size <$file["size"]) <BR>//Check file size<BR>{ <BR>echo "The file is too big!"; <BR>exit; <BR>} <BR>if(!in_array($file["type"], $uptypes)) <BR>//Check the file type<BR>{ <BR>echo "File type does not match!".$file["type"]; <BR>exit; <BR>} <BR>if(!file_exists($destination_folder)) <BR>{ <BR>mkdir($destination_folder) ; <BR>} <BR>$filename=$file["tmp_name"]; <BR>$image_size = getimagesize($filename); <BR>$pinfo=pathinfo($file["name"]); <BR>$ftype=$pinfo['extension']; <BR>$destination = $destination_folder. <BR>time().".".$ftype; <BR>if (file_exists($destination) && <BR>$ overwrite != true) <BR>{ <BR>echo "The file with the same name already exists"; <BR>exit; <BR>} <BR>if(!move_uploaded_file ($filename, <BR>$destination)) <BR>{ <BR>echo "Error moving file"; <BR>exit; <BR>} <BR>$pinfo=pathinfo($destination); <BR>$fname=$pinfo[basename]; <BR>echo " <font color=red>Uploaded successfully<br></font><br>File name: <br><font color=blue>".$destination_folder. <br>$fname."</ font><br>"; <br>echo " width:".$image_size[0]; <br>echo " length:".$image_size[1]; <br>echo "<br> size:" .$file["size"]." bytes"; <br>if($watermark==1) <br>{ <br>$iinfo=getimagesize($destination,$iinfo); <br>$nimage=imagecreatetruecolor ($image_size[0] <br>,$image_size[1]); <br>$white=imagecolorallocate($nimage,255,255,255); <br>$black=imagecolorallocate($nimage,0,0,0); <br>$red=imagecolorallocate($nimage,255,0,0); <br>imagefill($nimage,0,0,$white); <br>switch ($iinfo[2]) <br>{ <br>case 1: <br>$simage =imagecreatefromgif($destination); <br>break; <br>case 2: <br>$simage =imagecreatefromjpeg($destination); <br>break; <br>case 3: <br>$simage =imagecreatefrompng($destination); <br>break; <br>case 6: <br>$simage =imagecreatefromwbmp($destination); <br>break; <br>default: <br>die( "Unsupported file type"); <br>exit; <br>} <br>imagecopy($nimage,$simage,0,0,0,0, <br>$image_size[0],$image_size[1 ]); <br>imagefilledrectangle($nimage,1, <br>$image_size[1]-15,80,$image_size[1],$white); <br>switch($watertype) <br>{ <br>case 1: //Add watermark string<br>imagestring($nimage,2,3,$image_size[1]-15, <br>$waterstring,$black); <br>break; <br>case 2 : //Watermark image<br>$simage1 =imagecreatefromgif("xplore.gif"); <br>imagecopy($nimage,$simage1,0,0,0,0,85,15); <br>imagedestroy( $simage1); <br>break; <br>} <br>switch ($iinfo[2]) <br>{ <br>case 1: <br>//imagegif($nimage, $destination); <br>imagejpeg($nimage, $destination); <br>break; <br>case 2: <br>imagejpeg($nimage, $destination); <br>break; <br>case 3: <br>imagepng($ nimage, $destination); <br>break; <br>case 6: <br>imagewbmp($nimage, $destination); <br>//imagejpeg($nimage, $destination); <br>break; <br>} <br>//Overwrite the original uploaded file <br>imagedestroy($nimage); <br>imagedestroy($simage); <br>}<br>if($imgpreview==1) <br>{ <br>echo "<br>Image preview:<br>"; <br>echo "<ccid_file values="" width=". <BR>($image_size[0]*$imgpreviewsize)." <BR>height=".($image_size[1]*$imgpreviewsize);" <BR>echo " alt="Image preview:rFile name:". <BR>$destination."rUpload time:" />"; <br>} <br>} <br>?> <br></body> <br></html> <br> </div> <br><br>You can also refer to the PHP class for adding watermarks to pictures <p align="left"></p> <div style="display:none;"> <span id="url" itemprop="url">http://www.bkjia.com/PHPjc/321772.html</span><span id="indexUrl" itemprop="indexUrl">www.bkjia.com</span><span id="isOriginal" itemprop="isOriginal">true</span><span id="isBasedOnUrl" itemprop="isBasedOnUrl">http: //www.bkjia.com/PHPjc/321772.html</span><span id="genre" itemprop="genre">TechArticle</span><span id="description" itemprop="description">A regular website often needs to add its own website’s LOGO watermark to the image when uploading pictures. So how to implement this step? First let us understand PHP images...</span> </div> <div class="art_confoot"></div> </div> </div> <div style="height: 25px;"> <div class="wzconBq" style="display: inline-flex;"> <span>Related labels:</span> <div class="wzcbqd"> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=php" target="_blank">php</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=upload" target="_blank">upload</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=and" target="_blank">and</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=add" target="_blank">add</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=picture" target="_blank">picture</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=picture" target="_blank">picture</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=exist" target="_blank">exist</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=increase" target="_blank">Increase</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=regular" target="_blank">regular</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=watermark" target="_blank">watermark</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=of" target="_blank">of</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=kind" target="_blank">kind</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=website" target="_blank">website</a> <a onclick="hits_log(2,'www',this);" href-data="http://www.php.cn/search?word=need" target="_blank">need</a> </div> </div> <div style="display: inline-flex;float: right; color:#333333;">source:php.cn</div> </div> <div class="wzconOtherwz"> <a href="http://www.php.cn/faq/309926.html" title="Implementation code for php radio radio button to obtain and maintain values_PHP Tutorial"> <span>Previous article:Implementation code for php radio radio button to obtain and maintain values_PHP Tutorial</span> </a> <a href="http://www.php.cn/faq/309928.html" title="PHP checkbox checkbox value acquisition and checkbox default value output method_PHP tutorial"> <span>Next article:PHP checkbox checkbox value acquisition and checkbox default value output method_PHP tutorial</span> </a> </div> <div class="wzconShengming"> <div class="bzsmdiv">Statement of this Website</div> <div>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</div> </div> <div class="wwads-cn wwads-horizontal" data-id="156" style="max-width:955px"></div> <div class="wzconZzwz"> <div class="wzconZzwztitle">Latest Articles by Author</div> <ul> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611850.html">Simple PAXGold - Claim Now</a> </div> <div>2024-09-20 09:34:12</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611678.html">Jamie Dimon Praises Blockchain, Still Not A Fan Of Bitcoin</a> </div> <div>2024-09-20 09:01:12</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611652.html">Why Trust Tech Report</a> </div> <div>2024-09-20 06:49:29</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611644.html">Dogecoin (DOGE) Price Analysis: Stasis Broken, But Can the Meme Coin Reverse the Trend?</a> </div> <div>2024-09-20 06:45:29</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611640.html">Bitcoin (BTC) Spot Volume Hits $16B as Market Awaits High Volatility After Fed Rate Cut</a> </div> <div>2024-09-20 06:43:29</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611638.html">Bitcoin Dogs Could be the Crypto World's Best-Kept Secret</a> </div> <div>2024-09-20 06:42:29</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611630.html">The Integration of AI and Blockchain Is Taking Place at the Dawn of an Exciting New Era for Technology Innovation</a> </div> <div>2024-09-20 06:40:29</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611621.html">Mpeppe (MPEPE): A Rising Star in the Decentralized Casino and Gaming Space Backed by a Kaspa (KAS) Whale</a> </div> <div>2024-09-20 06:34:28</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611614.html">Beam (BEAM) and Mpeppe (MPEPE) Emerge as Market Contenders, Captivating Investors and Crypto Enthusiasts</a> </div> <div>2024-09-20 06:31:28</div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots"></span> <a target="_blank" href="http://www.php.cn/faq/1796611612.html">Beam (BEAM) and Mpeppe (MPEPE) Are Set to Explode in 2024, Offering Investors the Chance to Make 300x Profits</a> </div> <div>2024-09-20 06:30:28</div> </li> </ul> </div> <div class="wzconZzwz"> <div class="wzconZzwztitle">Latest Issues</div> <div class="wdsyContent"> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/173544.html" target="_blank" title="How to list data in a section by ID using while loop in PHP?" class="wdcdcTitle">How to list data in a section by ID using while loop in PHP?</a> <a href="http://www.php.cn/wenda/173544.html" class="wdcdcCons">I have a mysql table with these columns: series_id, series_color, product_name In the outp...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2023-11-17 20:03:03</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>290</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/173533.html" target="_blank" title="Call to undefined function create_function()" class="wdcdcTitle">Call to undefined function create_function()</a> <a href="http://www.php.cn/wenda/173533.html" class="wdcdcCons">I get this message on the home page of the website: Fatal error: Uncaught error: calling /...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2023-11-16 19:00:36</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>277</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/173519.html" target="_blank" title="<?php //Given a year, month and day, output the day of the year that the date is (note that leap year 4 100 400)" class="wdcdcTitle"><?php //Given a year, month and day, output the day of the year that the date is (note that leap year 4 100 400)</a> <a href="http://www.php.cn/wenda/173519.html" class="wdcdcCons"><?php //Given a year, month and day, output the day of the year that the date is (no...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2023-11-14 23:55:21</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>79</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/173517.html" target="_blank" title="PHP trim unicode spaces" class="wdcdcTitle">PHP trim unicode spaces</a> <a href="http://www.php.cn/wenda/173517.html" class="wdcdcCons">I'm trying to trim unicode spaces such as this character and I was able to do it using thi...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2023-11-13 08:49:45</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>2</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>398</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> <div class="wdsyConDiv flexRow wdsyConDiv1"> <div class="wdcdContent flexColumn"> <a href="http://www.php.cn/wenda/173514.html" target="_blank" title="TYPO3 V11: "PHP warning: undefined array key", $this->request->getArguments() is empty" class="wdcdcTitle">TYPO3 V11: "PHP warning: undefined array key", $this->request->getArguments() is empty</a> <a href="http://www.php.cn/wenda/173514.html" class="wdcdcCons">I'm a new user of typo3, I made a plugin to show users and use the search bar to filter th...</a> <div class="wdcdcInfo flexRow"> <div class="wdcdcileft"> <span class="wdcdciSpan"> From 2023-11-12 21:35:09</span> </div> <div class="wdcdciright flexRow"> <div class="wdcdcirdz flexRow ira"> <b class="wdcdcirdzi"></b>0 </div> <div class="wdcdcirpl flexRow ira"><b class="wdcdcirpli"></b>1</div> <div class="wdcdcirwatch flexRow ira"><b class="wdcdcirwatchi"></b>362</div> </div> </div> </div> </div> <div class="wdsyConLine wdsyConLine2"></div> </div> </div> <div class="wzconZt" > <div class="wzczt-title"> <div>Related Topics</div> <a href="http://www.php.cn/faq/zt" target="_blank">More> </a> </div> <div class="wzcttlist"> <ul> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/zmjlygwz"><img src="https://img.php.cn/upload/subject/202407/22/2024072214363078087.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="how to build a website" /> </a> <a target="_blank" href="http://www.php.cn/faq/zmjlygwz" class="title-a-spanl" title="how to build a website"><span>how to build a website</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/wzym"><img src="https://img.php.cn/upload/subject/202407/22/2024072214280489178.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="Website source code" /> </a> <a target="_blank" href="http://www.php.cn/faq/wzym" class="title-a-spanl" title="Website source code"><span>Website source code</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/tpldwzzmxg"><img src="https://img.php.cn/upload/subject/202407/22/2024072214141457489.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="How to modify the text in the picture" /> </a> <a target="_blank" href="http://www.php.cn/faq/tpldwzzmxg" class="title-a-spanl" title="How to modify the text in the picture"><span>How to modify the text in the picture</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/phpwjzmdk"><img src="https://img.php.cn/upload/subject/202407/22/2024072214120868901.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="How to open php file" /> </a> <a target="_blank" href="http://www.php.cn/faq/phpwjzmdk" class="title-a-spanl" title="How to open php file"><span>How to open php file</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/rhpbwz"><img src="https://img.php.cn/upload/subject/202407/22/2024072214105498409.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="How to block a website" /> </a> <a target="_blank" href="http://www.php.cn/faq/rhpbwz" class="title-a-spanl" title="How to block a website"><span>How to block a website</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/phpzmqcszys"><img src="https://img.php.cn/upload/subject/202407/22/2024072214004499289.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="How to remove the first few elements of an array in php" /> </a> <a target="_blank" href="http://www.php.cn/faq/phpzmqcszys" class="title-a-spanl" title="How to remove the first few elements of an array in php"><span>How to remove the first few elements of an array in php</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/phpfxlsb"><img src="https://img.php.cn/upload/subject/202407/22/2024072214003558557.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="What to do if php deserialization fails" /> </a> <a target="_blank" href="http://www.php.cn/faq/phpfxlsb" class="title-a-spanl" title="What to do if php deserialization fails"><span>What to do if php deserialization fails</span> </a> </li> <li class="ul-li"> <a target="_blank" href="http://www.php.cn/faq/phpljmssql"><img src="https://img.php.cn/upload/subject/202407/22/2024072213560082376.jpg?x-oss-process=image/resize,m_fill,h_145,w_220" alt="How to connect php to mssql database" /> </a> <a target="_blank" href="http://www.php.cn/faq/phpljmssql" class="title-a-spanl" title="How to connect php to mssql database"><span>How to connect php to mssql database</span> </a> </li> </ul> </div> </div> </div> </div> <div class="phpwzright"> <div class="wzrOne"> <div class="wzroTitle">Popular Recommendations</div> <div class="wzroList"> <ul> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="How to set up hosts on Mac computer (steps with pictures and text)" href="http://www.php.cn/faq/448310.html">How to set up hosts on Mac computer (steps with pictures and text)</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="Quickly build a simple QQ robot with PHP" href="http://www.php.cn/faq/448391.html">Quickly build a simple QQ robot with PHP</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="API common signature verification methods (PHP implementation)" href="http://www.php.cn/faq/448286.html">API common signature verification methods (PHP implementation)</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="Collection of common date and time operations in PHP" href="http://www.php.cn/faq/448309.html">Collection of common date and time operations in PHP</a> </div> </li> <li> <div class="wzczzwzli"> <span class="layui-badge-dots wzrolr"></span> <a style="height: auto;" title="PHP generates graphic verification code (enhanced interference type)" href="http://www.php.cn/faq/448308.html">PHP generates graphic verification code (enhanced interference type)</a> </div> </li> </ul> </div> </div> <script src="https://sw.php.cn/hezuo/cac1399ab368127f9b113b14eb3316d0.js" type="text/javascript"></script> <div class="wzrThree"> <div class="wzrthree-title"> <div>Popular Tutorials</div> <a target="_blank" href="http://www.php.cn/course.html">More> </a> </div> <div class="wzrthreelist swiper2"> <div class="wzrthreeTab swiper-wrapper"> <div class="check tabdiv swiper-slide" data-id="one">Related Tutorials <div></div></div> <div class="tabdiv swiper-slide" data-id="two">Popular Recommendations<div></div></div> <div class="tabdiv swiper-slide" data-id="three">Latest courses<div></div></div> </div> <ul class="one"> <li> <a target="_blank" href="http://www.php.cn/course/812.html" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)"/> </a> <div class="wzrthree-right"> <a target="_blank" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" href="http://www.php.cn/course/812.html">The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)</a> <div class="wzrthreerb"> <div>1402932 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="812"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/74.html" title="PHP introductory tutorial one: Learn PHP in one week" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/6253d1e28ef5c345.png" alt="PHP introductory tutorial one: Learn PHP in one week"/> </a> <div class="wzrthree-right"> <a target="_blank" title="PHP introductory tutorial one: Learn PHP in one week" href="http://www.php.cn/course/74.html">PHP introductory tutorial one: Learn PHP in one week</a> <div class="wzrthreerb"> <div>4230545 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="74"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/286.html" title="JAVA Beginner's Video Tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a2bacfd9379.png" alt="JAVA Beginner's Video Tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="JAVA Beginner's Video Tutorial" href="http://www.php.cn/course/286.html">JAVA Beginner's Video Tutorial</a> <div class="wzrthreerb"> <div>2417735 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="286"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/504.html" title="Little Turtle's zero-based introduction to learning Python video tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a67ce3a6655.png" alt="Little Turtle's zero-based introduction to learning Python video tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Little Turtle's zero-based introduction to learning Python video tutorial" href="http://www.php.cn/course/504.html">Little Turtle's zero-based introduction to learning Python video tutorial</a> <div class="wzrthreerb"> <div>498086 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="504"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/2.html" title="PHP zero-based introductory tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/6253de27bc161468.png" alt="PHP zero-based introductory tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="PHP zero-based introductory tutorial" href="http://www.php.cn/course/2.html">PHP zero-based introductory tutorial</a> <div class="wzrthreerb"> <div>833897 <b class="kclbcollectb"></b></div> <div class="courseICollection" data-id="2"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> <ul class="two" style="display: none;"> <li> <a target="_blank" href="http://www.php.cn/course/812.html" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/041/620debc3eab3f377.jpg" alt="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)"/> </a> <div class="wzrthree-right"> <a target="_blank" title="The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)" href="http://www.php.cn/course/812.html">The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course)</a> <div class="wzrthreerb"> <div >1402932 times of learning</div> <div class="courseICollection" data-id="812"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/286.html" title="JAVA Beginner's Video Tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a2bacfd9379.png" alt="JAVA Beginner's Video Tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="JAVA Beginner's Video Tutorial" href="http://www.php.cn/course/286.html">JAVA Beginner's Video Tutorial</a> <div class="wzrthreerb"> <div >2417735 times of learning</div> <div class="courseICollection" data-id="286"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/504.html" title="Little Turtle's zero-based introduction to learning Python video tutorial" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62590a67ce3a6655.png" alt="Little Turtle's zero-based introduction to learning Python video tutorial"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Little Turtle's zero-based introduction to learning Python video tutorial" href="http://www.php.cn/course/504.html">Little Turtle's zero-based introduction to learning Python video tutorial</a> <div class="wzrthreerb"> <div >498086 times of learning</div> <div class="courseICollection" data-id="504"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/901.html" title="Quick introduction to web front-end development" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/64be28a53a4f6310.png" alt="Quick introduction to web front-end development"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Quick introduction to web front-end development" href="http://www.php.cn/course/901.html">Quick introduction to web front-end development</a> <div class="wzrthreerb"> <div >214160 times of learning</div> <div class="courseICollection" data-id="901"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/234.html" title="Master PS video tutorials from scratch" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/068/62611f57ed0d4840.jpg" alt="Master PS video tutorials from scratch"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Master PS video tutorials from scratch" href="http://www.php.cn/course/234.html">Master PS video tutorials from scratch</a> <div class="wzrthreerb"> <div >858726 times of learning</div> <div class="courseICollection" data-id="234"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> <ul class="three" style="display: none;"> <li> <a target="_blank" href="http://www.php.cn/course/1648.html" title="[Web front-end] Node.js quick start" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662b5d34ba7c0227.png" alt="[Web front-end] Node.js quick start"/> </a> <div class="wzrthree-right"> <a target="_blank" title="[Web front-end] Node.js quick start" href="http://www.php.cn/course/1648.html">[Web front-end] Node.js quick start</a> <div class="wzrthreerb"> <div >4664 times of learning</div> <div class="courseICollection" data-id="1648"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1647.html" title="Complete collection of foreign web development full-stack courses" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/6628cc96e310c937.png" alt="Complete collection of foreign web development full-stack courses"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Complete collection of foreign web development full-stack courses" href="http://www.php.cn/course/1647.html">Complete collection of foreign web development full-stack courses</a> <div class="wzrthreerb"> <div >3614 times of learning</div> <div class="courseICollection" data-id="1647"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1646.html" title="Go language practical GraphQL" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662221173504a436.png" alt="Go language practical GraphQL"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Go language practical GraphQL" href="http://www.php.cn/course/1646.html">Go language practical GraphQL</a> <div class="wzrthreerb"> <div >3100 times of learning</div> <div class="courseICollection" data-id="1646"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1645.html" title="550W fan master learns JavaScript from scratch step by step" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/662077e163124646.png" alt="550W fan master learns JavaScript from scratch step by step"/> </a> <div class="wzrthree-right"> <a target="_blank" title="550W fan master learns JavaScript from scratch step by step" href="http://www.php.cn/course/1645.html">550W fan master learns JavaScript from scratch step by step</a> <div class="wzrthreerb"> <div >558 times of learning</div> <div class="courseICollection" data-id="1645"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> <li> <a target="_blank" href="http://www.php.cn/course/1644.html" title="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours" class="wzrthreelaimg"> <img src="https://img.php.cn/upload/course/000/000/067/6616418ca80b8916.png" alt="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours"/> </a> <div class="wzrthree-right"> <a target="_blank" title="Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours" href="http://www.php.cn/course/1644.html">Python master Mosh, a beginner with zero basic knowledge can get started in 6 hours</a> <div class="wzrthreerb"> <div >16047 times of learning</div> <div class="courseICollection" data-id="1644"> <b class="nofollow small-nocollect"></b> </div> </div> </div> </li> </ul> </div> <script> var mySwiper = new Swiper('.swiper2', { autoplay: false,//可选选项,自动滑动 slidesPerView : 'auto', }) $('.wzrthreeTab>div').click(function(e){ $('.wzrthreeTab>div').removeClass('check') $(this).addClass('check') $('.wzrthreelist>ul').css('display','none') $('.'+e.currentTarget.dataset.id).show() }) </script> </div> <div class="wzrFour"> <div class="wzrfour-title"> <div>Latest Downloads</div> <a href="http://www.php.cn/xiazai">More> </a> </div> <script> $(document).ready(function(){ var sjyx_banSwiper = new Swiper(".sjyx_banSwiperwz",{ speed:1000, autoplay:{ delay:3500, disableOnInteraction: false, }, pagination:{ el:'.sjyx_banSwiperwz .swiper-pagination', clickable :false, }, loop:true }) }) </script> <div class="wzrfourList swiper3"> <div class="wzrfourlTab swiper-wrapper"> <div class="check swiper-slide" data-id="onef">Web Effects <div></div></div> <div class="swiper-slide" data-id="twof">Website Source Code<div></div></div> <div class="swiper-slide" data-id="threef">Website Materials<div></div></div> <div class="swiper-slide" data-id="fourf">Front End Template<div></div></div> </div> <ul class="onef"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery enterprise message form contact code" href="http://www.php.cn/xiazai/js/8071">[form button] jQuery enterprise message form contact code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="HTML5 MP3 music box playback effects" href="http://www.php.cn/xiazai/js/8070">[Player special effects] HTML5 MP3 music box playback effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="HTML5 cool particle animation navigation menu special effects" href="http://www.php.cn/xiazai/js/8069">[Menu navigation] HTML5 cool particle animation navigation menu special effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery visual form drag and drop editing code" href="http://www.php.cn/xiazai/js/8068">[form button] jQuery visual form drag and drop editing code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="VUE.JS imitation Kugou music player code" href="http://www.php.cn/xiazai/js/8067">[Player special effects] VUE.JS imitation Kugou music player code</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="Classic html5 pushing box game" href="http://www.php.cn/xiazai/js/8066">[html5 special effects] Classic html5 pushing box game</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="jQuery scrolling to add or reduce image effects" href="http://www.php.cn/xiazai/js/8065">[Picture special effects] jQuery scrolling to add or reduce image effects</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a target="_blank" title="CSS3 personal album cover hover zoom effect" href="http://www.php.cn/xiazai/js/8064">[Photo album effects] CSS3 personal album cover hover zoom effect</a> </div> </li> </ul> <ul class="twof" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8328" title="Home Decor Cleaning and Repair Service Company Website Template" target="_blank">[Front-end template] Home Decor Cleaning and Repair Service Company Website Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8327" title="Fresh color personal resume guide page template" target="_blank">[Front-end template] Fresh color personal resume guide page template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8326" title="Designer Creative Job Resume Web Template" target="_blank">[Front-end template] Designer Creative Job Resume Web Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8325" title="Modern engineering construction company website template" target="_blank">[Front-end template] Modern engineering construction company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8324" title="Responsive HTML5 template for educational service institutions" target="_blank">[Front-end template] Responsive HTML5 template for educational service institutions</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8323" title="Online e-book store mall website template" target="_blank">[Front-end template] Online e-book store mall website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8322" title="IT technology solves Internet company website template" target="_blank">[Front-end template] IT technology solves Internet company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8321" title="Purple style foreign exchange trading service website template" target="_blank">[Front-end template] Purple style foreign exchange trading service website template</a> </div> </li> </ul> <ul class="threef" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3078" target="_blank" title="Cute summer elements vector material (EPS PNG)">[PNG material] Cute summer elements vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3077" target="_blank" title="Four red 2023 graduation badges vector material (AI EPS PNG)">[PNG material] Four red 2023 graduation badges vector material (AI EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3076" target="_blank" title="Singing bird and cart filled with flowers design spring banner vector material (AI EPS)">[banner picture] Singing bird and cart filled with flowers design spring banner vector material (AI EPS)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3075" target="_blank" title="Golden graduation cap vector material (EPS PNG)">[PNG material] Golden graduation cap vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3074" target="_blank" title="Black and white style mountain icon vector material (EPS PNG)">[PNG material] Black and white style mountain icon vector material (EPS PNG)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3073" target="_blank" title="Superhero silhouette vector material (EPS PNG) with different color cloaks and different poses">[PNG material] Superhero silhouette vector material (EPS PNG) with different color cloaks and different poses</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3072" target="_blank" title="Flat style Arbor Day banner vector material (AI+EPS)">[banner picture] Flat style Arbor Day banner vector material (AI+EPS)</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/sucai/3071" target="_blank" title="Nine comic-style exploding chat bubbles vector material (EPS+PNG)">[PNG material] Nine comic-style exploding chat bubbles vector material (EPS+PNG)</a> </div> </li> </ul> <ul class="fourf" style="display:none"> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8328" target="_blank" title="Home Decor Cleaning and Repair Service Company Website Template">[Front-end template] Home Decor Cleaning and Repair Service Company Website Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8327" target="_blank" title="Fresh color personal resume guide page template">[Front-end template] Fresh color personal resume guide page template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8326" target="_blank" title="Designer Creative Job Resume Web Template">[Front-end template] Designer Creative Job Resume Web Template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8325" target="_blank" title="Modern engineering construction company website template">[Front-end template] Modern engineering construction company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8324" target="_blank" title="Responsive HTML5 template for educational service institutions">[Front-end template] Responsive HTML5 template for educational service institutions</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8323" target="_blank" title="Online e-book store mall website template">[Front-end template] Online e-book store mall website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8322" target="_blank" title="IT technology solves Internet company website template">[Front-end template] IT technology solves Internet company website template</a> </div> </li> <li> <div class="wzrfourli"> <span class="layui-badge-dots wzrflr"></span> <a href="http://www.php.cn/xiazai/code/8321" target="_blank" title="Purple style foreign exchange trading service website template">[Front-end template] Purple style foreign exchange trading service website template</a> </div> </li> </ul> </div> <script> var mySwiper = new Swiper('.swiper3', { autoplay: false,//可选选项,自动滑动 slidesPerView : 'auto', }) $('.wzrfourlTab>div').click(function(e){ $('.wzrfourlTab>div').removeClass('check') $(this).addClass('check') $('.wzrfourList>ul').css('display','none') $('.'+e.currentTarget.dataset.id).show() }) </script> </div> </div> </div> <div class="phpFoot"> <div class="phpFootIn"> <div class="phpFootCont"> <div class="phpFootLeft"> <dl> <dt> <a href="http://www.php.cn/about/us.html" rel="nofollow" target="_blank" title="About us" class="cBlack">About us</a> <a href="http://www.php.cn/about/disclaimer.html" rel="nofollow" target="_blank" title="Disclaimer" class="cBlack">Disclaimer</a> <a href="http://www.php.cn/update/article_0_1.html" target="_blank" title="Sitemap" class="cBlack">Sitemap</a> <div class="clear"></div> </dt> <dd class="cont1">php.cn:Public welfare online PHP training,Help PHP learners grow quickly!</dd> </dl> </div> </div> </div> </div> <input type="hidden" id="verifycode" value="/captcha.html"> <script>layui.use(['element', 'carousel'], function () {var element = layui.element;$ = layui.jquery;var carousel = layui.carousel;carousel.render({elem: '#test1', width: '100%', height: '330px', arrow: 'always'});$.getScript('/static/js/jquery.lazyload.min.js', function () {$("img").lazyload({placeholder: "/static/images/load.jpg", effect: "fadeIn", threshold: 200, skip_invisible: false});});});</script> <script src="/static/js/common_new.js"></script> <script type="text/javascript" src="/static/js/jquery.cookie.js?1726803486"></script> <script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script> <link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css?2' type='text/css' media='all'/> <script type='text/javascript' src='/static/js/viewer.min.js?1'></script> <script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script> <script type="text/javascript" src="/static/js/global.min.js?5.5.53"></script> </body> </html>