A case of Php des encryption and decryption code

/** * PHP des encryption and decryption * by http://bbs.it-home.org */ function Do_mencrypt ($input, $key) { $input = Str_replace ("" N "," ", $input); $input = Str_replace ("" T "," ", $input); $input =

Introduction to PHP MCrypt Enable, encrypt, and decrypt methods

$str = "I am Levin"; $key = "123qwe.019860905061x"; $cipher = mcrypt_rijndael_128; $mode = MCRYPT_MODE_ECB; $iv = Mcrypt_create_iv (Mcrypt_get_iv_size ($cipher, $mode), Mcrypt_rand); echo "Original:" $str. "

PHP get CPU and Memory usage code example

/* @ system parameter probing LINUX @Edit bbs.it-home.org @date 2013/5/8 */ function Sys_linux () { Cpu if (false = = = ($str = @file ("/proc/cpuinfo"))) return false; $str = Implode ("", $str);

PHP cookie Operation details (set, use, delete)

This article describes, in PHP settings, use, deletion of cookies, and some restrictions on cookies related content, there is a need for friends, can refer to.1. set cookies to set cookies in PHP and use the Setcookie function. Note: Cookies are

A simple example of a PHP counter

To introduce a simple PHP write counter, the number of visits written into the library, where to display the call. is a good example of getting started.Database: DB table: Numname user jb123 Access count IP visit ipnew number of visitsThe code is as

Example of whether PHP detects the existence of a remote file

$url = ' http://xxxx.com '; $hander _array = get_headers ($url); if ($header _array [0] = = ' http/1.1 OK ') { echo ' file exists '; } else { Echo ' file does not exist '; } Copy CodeDescription: Get_headers

A few questions and answers to the questions in PHP Programmer's face

$STR 1 = null; $str 2 = false; echo $str 1== $str 2? ' Equal ': ' Not equal '; $str 3 = "; $str 4 = 0; Echo $str 3== $str 4? ' Equal ': ' Not equal '; $str 5 = 0; $str 6 = ' 0′; echo $str 5=== $

PHP Session cross-domain cross-server solution sharing

For you to introduce the next PHP session how to achieve cross-domain and cross-server sharing of the solution, the need for friends, you can refer to the next.In addition to ASP., all sessions must be reserved with session ID. The main location of

How to implement the local refresh function of PHP page

--> IFrame Local Refresh _bbs.it-home.org if (Isset ($question) &&!empty ($question)) { } ?>?

PHP Delete directory n days before the code of all files in one example

For everyone to introduce a can delete the specified directory n days before all the files of the PHP code, the need for friends, you can refer to the next.The code is as follows: $n) unlink ($fullpath); Delete File }}} }

PHP Anti-injection Code (filter parameters)

PHP filters $_get and $_post parameters to prevent injected code, there are friends in need, can refer to below.The complete code is as follows. $value) {if (!is_array ($value)) {$value = GET_MAGIC_QUOTES_GPC ()? $value: Addslashes ($value);

PHP FTP Class (copy, move, delete files, create directories, etc.)

A good FTP operation class, you can complete the copy, move, delete files, create directories and other operations, the need for friends, you can refer to the next.1. FTP Operation class conn_id = @ftp_connect ($FTP _host, $FTP _port) or Die

PHP Programming basics of Isset and empty

This article introduces the PHP programming based on the most commonly used two functions isset and empty, to give a few examples, for everyone to learn the reference.In the basic PHP programming, the most commonly used two functions, isset and

PHP json_encode function Alternative (can display in Chinese)

/** * Alternative functions for Json_encode * Edit bbs.it-home.org */ function Jsonencode ($var) { if (function_exists (' Json_encode ')) { Return Json_encode ($var); } else { Switch (GetType ($var)) {

Phpmailer e-mail message Chinese attachment name garbled solution

rar

$mail->addattachment ($attach, $attach); Copy CodeSending past attachment filenames will be garbled if not specified: $mail->addattachment ($attach, $attach); Copy CodeSent in the past

Summary of methods for matching characters in PHP regular expressions

In this paper, the use of regular expressions in PHP to match the character of the method, there is a need for friends, refer to learning it.1, the character for a single character, usually in the literal sense, the character indicates that the

crontab Introduction to how PHP Works automatically

This article introduces, in PHP, with the help of Crontab, the method of automatic operation of related programs, the need for friends, refer to it.The crontab-operates the daemon for each user and the schedule for that execution. Some of the

A wrapper class for PHP verification code

/** * Verification Code Class * Edit bbs.it-home.org */ Class Validationcode { Private $width; Private $height; Private $codeNum; Private $image; Image Resources Private $disturbColorNum; Private

About system variables and environment variables in PHP

This article introduces the relevant knowledge of the system variables and environment variables in PHP, the need for friends, you can refer to learning.In daily PHP programming, there are times when changes to system variables and environment

PHP multithreaded implementation of a multi-process cross-platform code example

Define (' dir_php_exec ', ' PHP '); Define (' Dir_main_exec ', __file__); Define (' dir_tmp ', '/tmp '); Require_once (' my_process.php '); Class PP extends My_process_base { Public function run ($param = null) {

Total Pages: 5208 1 .... 1739 1740 1741 1742 1743 .... 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.