PHP image upload class can also generate thumbnails and watermark

The code is as follows Copy Code Class Upimages {var $annexfolder = "Upload";//Attachment storage point, default: Annexvar $smallfolder = "small";//thumbnail store path, note: Must be a subdirectory under the $annexfolder, default is:

PHP Generate thumbnail class

The code is as follows Copy Code Class Resizeimage{Picture typevar $type;Actual widthvar $width;Actual heightvar $height;The width after the changevar $resize _width;Change the height of the postvar $resize _height;Whether or not to

Mail function in PHP failed to send file resolution

Before that server transferred, found that the Web site with mail () sent to send mail. But found SendMail has been installed. If SendMail is not installed, you can perform The code is as follows Copy Code Yum Install

PHP generates Excel files

The code is as follows Copy Code Class excel{var $header = ""xmlns:x= "Urn:schemas-microsoft-com:office:excel"Xmlns:ss= "Urn:schemas-microsoft-com:office:spreadsheet"Xmlns:html= "HTTP://WWW.W3.ORG/TR/REC-HTML40" > "; var $footer = ""

Number of online PHP websites

Just used PHP to write a website online number of procedures, please come in to guide!I use Php+mysql to write, principle: Website online number of program code + backstage has MySQL database support, you can directly statistics the current number

PHP calls WebService two implementation code

OK now we're going to experience webservice The code is as follows Copy Code Server-Side serversoap.php $soap = new SoapServer (Null,array (' uri ' => ' http://192.168.1.179/');//this URI is your SERVER

Security issues with file uploads in PHP

Can read/etc/passwd! This paragraph. [File Upload] PHP automatically supports file uploads based on RFC 1867, let's look at the following example: The above code allows the user to select a file from the local machine, and the file is uploaded

Implementation of XML Library in PHP

This article illustrates the XML operation class of the PHP implementation. Share to everyone for your reference, specific as follows: This is an interface program, the need for a large number of analytical parsing xml,php xml_parse_into_struct ()

On the standard Art of PHP code, applicable to other languages

This article takes the PHP language as an example, introduces some good programming custom, hoped can be helpful to you. 1. Planning Code Structure Good PHP code should have a clear structure. The object-oriented nature of PHP allows programmers to

Implode () function in PHP implements character concatenation

Grammar Implode (Separator,array)//array is an array, separator is a cut character. Example The code is as follows Copy Code Link search criteria$wheresql = Implode (' and ', $wherearr); Link search criteriafunction

Php uploads images and generates bitmap code

Php uploads images and generates bitmap code. We often need to upload images, but we also need to retain our copyright so we will use image watermarks, the following program adds your own watermark effect to the image after the image is uploaded

Use php mail () to send emails

Use the php Tutorial mail () to send emailsThe mail () function allows you to send emails directly from scripts.If the mail is successfully received, true is returned; otherwise, false is returned.SyntaxMail (to, subject, message, headers,

Php mail with attachment function.

The code is as follows:Copy code $ Pipeline name = "testpipeline ";$ Email = "test@test.com ";$ Text = "Hello, the attachment contains the PDF file you need. Click to download. www.111cn.net "; // text content$ Text = base64_encode ($ text); //

The php mail function sends an email with attachments)

(Attachments can be included. The code is as follows:Copy code Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> php mail function sends an email with attachments // You might need to change this line, if you do not use// The default

Code for automatically sending emails (php code for sending emails)

The code is as follows:Copy code Class smtp{/* Public variables */Var $ smtp_port;Var $ time_out;Var $ host_name;Var $ log_file;Var $ relay_host;Var $ debug;Var $ auth;Var $ user;Var $ pass;/* Private variables */Var $ sock;/* Constractor

Use PHP to receive POP3 mails (3)

Application instance(Author: Chen Junqing October 18, 2000)The POP3 mail receiving class has already been described in detail in the previous article. Let's take a look at how to apply this class:Include ("pop3.inc. php ");$ Host = "pop.china.com ";$

PHP UTF-8 and gb2312 encoding garbled characters

After a while of php + mssql, I feel that mssql does not support encoding very well (in fact, I am still not sure about it), but I have not been eager to change the database, so I have to wait for a while, an error occurred while submitting the data

Iconv encoding conversion in php to solve Chinese garbled characters

The code is as follows:Copy code Echo $ str = 'Hi, it's coffee sale! ';Echo ' ';Echo iconv ('gb2312', 'utf-8', $ str); // Encode the string from GB2312 to UTF-8Echo ' ';Echo iconv_substr ($ str, 1, 1, 'utf-8'); // truncate by number of characters

PHP string regular expression replacement function preg_replace

Syntax: mixed preg_replace (mixed pattern, mixed replacement, mixed subject );Returned value: Hybrid DataFunction type: data processingDescription: This function uses the pattern rule to parse and compare the string subject. The string to be

Php Chinese garbled solutions

First, PHP webpage code1. The php Tutorial file encoding should match the webpage encoding.A. if you want to use gb2312 encoding, php needs to output the header: header ("Content-Type: text/html; charset = gb2312 "), add to the static page. All

Total Pages: 12780 1 .... 2657 2658 2659 2660 2661 .... 12780 Go to: GO

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.