MySQL Delete and change tool PHP class

Previous development projects did not use a framework, directly object-oriented development of a very useful MySQL tool class. Header ("Content-type:text/html;charset=utf-8"); Class dbutils{ /** *

Implement a function in PHP that can return multiple values

In Python and Golang there is a way to return multiple values at the same time, in fact, PHP can, but compared to Python and Golang a little more trouble, here is a simple demo example, here is a list function function

PHP supports sending classes for sending HTML-formatted messages

/** * Mail Sending Class * Supports sending plain text messages and HTML-formatted messages * @example * $config = Array ( * "from" and "* * * *", * "To" = "* *", * "Subject" = "Test", * "Body" = "test", *

PHP Time processing function

Mktime () Convert date and time to UNIX timestamp Time () Gets the Unix timestamp for the current time echo Date ("Y-m-d", Mktime (0,0,0,12,31,2013)). ""; Example: Calculates the age of a user by calculating the

A concise PHP reversible cryptographic function

Many times we need to encrypt and decrypt data, such as some data that needs to be saved to a cookie, but not easily accessible by the user, and we need to encrypt the data to be stored in a cookie, and then decrypt it when we need to use it.

PHP RAS Cryptography Class Code

Signing, checking, asymmetric, and decrypting with OpenSSL is required to be used with the files of the certificates of the "." (Crt and PEM). /** * RSA Algorithm Class * Signature and Ciphertext code: Base64 string/16

PHP traversal directory and file list

Define (' DS ', directory_separator); Class getdirfile{ Returns an array Private $DirArray = Array (); Private $FileArray = Array (); Private $DirFileArray = Array (); Private $Handle, $Dir, $File;

PHP uses Curl to forge IP address and header information

Although Curl is powerful, but can only forge $_server["Http_x_forwarded_for", for most IP address detection procedures, $_server["REMOTE_ADDR"] is difficult to forge: The first is the client.php code. 01

PHP Post JSON data

function Http_post_data ($url, $data _string) { $ch = Curl_init (); curl_setopt ($ch, Curlopt_post, 1); curl_setopt ($ch, Curlopt_url, $url); curl_setopt ($ch, Curlopt_postfields, $data _string); curl_setopt ($ch,

Code to back up MySQL data via PHP

##################### Configurations ##################### Define the name of the backup directory Define (' Backup_dir ', './mybackups '); Define Database Credentials Define (' HOST ', ' localhost '); Define ('

PHP code to get a brief introduction to Douban on movie information

[PHP] Code Search Links function Search_link ($moviename) { Constructs a URL where max-results can change as needed $urlString = ' http://api.douban.com/movie/subjects?q= '. $moviename. '

PHP calculates the space occupied by the file under the specified directory

PHP calculates the space occupied by the file under the specified directoryPHP can provide a way to access each element in a subdirectory through the recursivedirectoryiterator extension Directoryiterator's GetChildren () method, and the following

A handy Verification code PHP tool class

/** * Verification Code Class */ Class base_tool_verify{ /** * Generate Verification Code method */ public static function Createcode () { Generate a Captcha picture Full Digital $str = "D,b,2,3,4,5,6

PHP Detection Browser Type code

Simple browser detection $is _lynx = $is _gecko = $is _winie = $is _macie = $is _opera = $is _ns4 = $is _safari = $is _chrome = false; if (Strpos ($_server[' http_user_agent '), ' Lynx ')!== false) { $is _lynx = true; }

PHP three ways to send a POST request

[PHP] Code Class request{ public static function post ($url, $post _data = ", $timeout = 5) {//curl $ch = Curl_init (); curl_setopt ($ch, Curlopt_url, $url); curl_setopt ($ch, Curlopt_post, 1);

PHP Mail Operation class

Class SMTP { var $smtp _port; var $time _out; var $host _name; var $log _file; var $relay _host; var $debug; var $auth; var $user; var $pass; var $sock; function smtp ($relay _host = "",

Very simple a socket client PHP class

PHP 5, need to open socket extension Socke Operation class Class Socket { private $host;//host connecting the socket Private $port;//socket's port number Private $error =array (); Private $socket =null;//socket

PHP implements Linux command tail

PHP implements Linux command tail-fToday, I suddenly think of someone asked me a question, how to implement the Linux command tail-f through PHP, here to analyze the implementation. This thought is also quite simple, through a loop detection file,

PHP PDO operation MySQL Package class

/** * Auther soulence * Call Data class file * Modify 2015/06/12 */ Class Dbconnect { Private $dbname = null; Private $pdo = null; Private $persistent = false; Private $statement = null; Private

Three ways to get post data from PHP

method One, $_post $_post or $_request is stored in PHP in the form of key=>value format after the data. method Two, using file_get_contents ("Php://input") For post data that does not specify Content-type, you can use File_get_contents

Total Pages: 5208 1 .... 2036 2037 2038 2039 2040 .... 5208 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.