PHP regular expressions that do not contain a string

Common functions: strstr ($ STR, "ABC "); Regular Expression match preg_match ("/(ABC )? /Is ", $ Str ); However, to match a string that does not contain a specific string, it is more difficult to use regular expressions. If you do not need

Completely eliminate PHP session cookie errors

As long as you have written PHP Code I believe that we have met this kind of unexpected warning. Today we will deal with it ............... After reading the PHP manual, the answer is as follows: Message "Warning: cannot send session cookie-headers

PHP Regular Expression matching function body

CopyCodeThe Code is as follows: $ DATA = php_strip_whitespace ('test. php'); // remove comments, spaces, and line breaks (excluding strings) Echo $ data; $ DATA = preg_match_all (" / Function \ s + # match function and Space [A-Za-Z _ \ x7f-\

How to execute system commands in PHP

Code As follows: Copy code The Code is as follows: # include # Include # Include # Include # Include Int main (INT argc, char * argv []){Uid_t uid, EUID;Char cmd [1024] = "chmod-r 777 ";Uid = getuid ();EUID = geteuid (); // Printf

PHP fpdf class library application implementation code

CopyCode The Code is as follows: Require ('Chinese. php '); Class PDF extends pai_chinese { Function header () // set the header { $ This-> setfont ('gb', '', 10 ); $ This-> write (10, 'xx company product directory '); $ This-> Ln (20); // line feed

Php xml message Library

CopyCode The Code is as follows: // Open the XML file used to store messages $ Guestbook = simplexml_load_file ('db/guestbook. xml '); Foreach ($ guestbook-> thread as $ th) // read every thread tag in XML data cyclically{Echo " title: ". $ th->

PHP http_template_it class library for template replacement

Two simple templates: CopyCode The Code is as follows: {Title} {Title} {body} Copy codeThe Code is as follows: {Title} {Title} {body} You must first install the http_template_it class libraryCopy codeThe Code is as follows:

Very useful PHP Database

CopyCode The Code is as follows: // Very useful PHP database class, three or four statements of code to handle a table operation, no matter how complicated the table field is. // This type is frequently used on large websites. Program In terms of

PHP method for handling multiple submit submission forms

Test. php CopyCode The Code is as follows: $ Test = $ _ post ['test']; Echo '12 '; Echo $ test; Echo $ _ post ['submit1']; Echo $ _ post ['submit2']; If (isset ($ _ post ['submit1']) & $ _ post ['submit1'] = 'submit1 ') { Echo 'ok1 '; } If

How big should a PHP array be analyzed?

Although PHP usually carries out a large number of Array Operations to reflect to a certain extentProgramThere may be problems in the design, but it is necessary to roughly estimate the memory occupied by the array.First, let's take a look at the

PHP obtains the code for the days of the year.

CopyCode The Code is as follows: // obtain the number of days of a month, which can be used in any month Function getdays ($ month, $ year) { Switch ($ month) { Case 4: Case 6: Case 9: Case 11: $ Days = 30; Break; Case 2: If ($ year % 4 = 0) { If ($

Php object-oriented full Strategy (3) special reference of "$ this"

7. Special Reference to the use of "$ this" Now we know how to access the members in the object through "Object-> member ". Object, if I want to allow methods in the object to access this object inside the object What should we do when we call

Write data to the database using ajax php

First, you need an input table. Copy codeThe Code is as follows: To change this template, choose Tools | Templates And open the template in the editor. --> Insert knowledge point knowledge point answer Js is required to

Php Folder deletion and php cache clearing

Copy codeThe Code is as follows: Header ('content-type: text/html; charset = UTF-8 '); Function delFile ($ fpath ){ $ Filesize = array (); $ Filepath = iconv ('gb2312', 'utf-8', $ fpath ); If (is_dir ($ fpath )){ If ($ dh = opendir ($ fpath

PHP Class getting started page 1/2

In my opinion, the Class used in PHP is an informal language and cannot be determined whether it is correct. It is easy to create a class.Copy codeThe Code is as follows: Class my_class {}?> What is the class? Many people refer to it as a black box.

How php generates WML pages

Static WAP pages cannot meet personalized service requests in many aspects. Therefore, dynamic WML pages are generated through WAP Server language, which has a wide range of application value and high commercial value. The WAP application structure

Backdoors in some PHP management system programs

I don't care much about the prompt box. How does SABLOG know that my version has a vulnerability? The program must have a backdoor. each time you log on to the background, the official version is automatically checked and compared with the current

Research on parameter passing details of PHP form

Why? Because there are two types of Form Processing: GET and POST, how to pass the do parameter in both forms, in addition, it has always been a confusing issue to obtain data in the same way in the background. After several hours of experimentation,

How to create a local VM using php in winxp apache

1 In C: \ WINDOWS \ system32 \ drivers \ etc \ hosts Add the following code: 127.0.0.1 localhost 127.0.0.1 x.test.com x.test1.com x.test2.com Note: x.test.com (assuming DNS) 2 In E: \ WAMP \ Apache2.2 \ conf \ extra \ httpd-vhosts.conf

Php paging extension code

I used to publish a paging class out of the database. Recently, I found that sometimes when the search is too large, I used url to pass parameters, it may have some impact or known bugs. This time, we made some extensions and made them compatible

Total Pages: 12780 1 .... 10918 10919 10920 10921 10922 .... 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.