PHP Message Board Content Deletion code

<meta http-equiv= "Content-type" content= "HTML; Charset=utf-8 "/> <?php $lianjie = mysql_connect (" localhost "," root "," Xiaolie ") or Die (...).

PHP Autonomous Simple Message Board code

<meta http-equiv= "Content-type" content= "HTML; Charset=utf-8 "/> <?php $lianjie = mysql_connect (" localhost "," root "," Xiaolie ") or Die (...).

PHP Picture Counter Example Tutorial

With the counter of the beautiful, we often use pictures to do statistics of the number 1,2 to 10 we just do 0,9 picture number, and then use the following method to make beautiful counter out oh. $fp = fopen ($countfile, "R"); Open file in read-only mode $array _count = 1; Defines a variable that represents the position of an array element, with a while (! feof ($fp)) ...

php.ini configuration and CMS program efficiency optimization configuration talk

Developers who have done CMS know that in the LAMP environment for background login and upload files are prone to problems in two places, and mostly because of PHP configuration issues, so make PHP optimization is essential. For PHP optimization, the main parameters of the php.ini reasonable adjustments and settings, the following we take a look at some of the php.ini done CMS developers know in the LAMP environment background Login and upload files, is ...

PHP generates HTML static throughout the site

I often see someone on the Internet asking how to static the entire dynamic website, in fact, the method is very simple. ob_start (); // Here is your code // add ob_end_clean () at the end and output this page to a variable $ temp = ob_get_contents (); ob_end_clean (); / / Written I often see someone on the Internet asking how the entire dynamic website static, in fact, ...

php to get the current page URL address and parameters

php tutorial to get the current page url address and parameters To get the full address of the current page we have to go through many operations such as http or https tutorial php file and path host domain name query parameters finally became. Get the protocol - http url protocol that can be read in the $ _server ['server_protocol'] variable. * / echo $ _server ['server_protocol']; / * If you check the value, you can find that not only ...

PHP detection array length function sizeof count

php tutorial to detect the length of the array function sizeof count in php detection array length function sizeof count Now see a simple example * / $ colorlist = array ("apple" => "red", "grass" => "green", " sky "=>" bl ...

PHP array definition and initialization learning notes

Array definition and initialization What is an array? An array is a programming structure that is a variable that holds a set of values ​​or a series of values. For example, at the time of the census, personal identity registration, such as name, gender, nationality, birth, etc. can be used as an array. The array created in the php tutorial is defined using the array () structure, such as $ people = array ('name', 'sex', 'nation', 'brith'); and how to display the value of each element in the array Is to use the index from 0, the index number ...

php Chinese garbled problems and MySql Chinese garbled solution

Chinese garbled problems and mysql tutorial Chinese garbled solution <html> <head> <title> </ title> </ head> <body> <? php $ mysql_server_name = 'localhost'; $ mysql_username = 'root' ; $ mysql_password = '000 ...

backslash in php /

Some people like to make up slash, such as $ dir = dirname (__ FILE__). '/'; Some people find it cumbersome and code is not good, directly with $ dir = dirname (__FILE__); So when we want to include the file There may be problems. For example, to include test.php, if it is dirname (__FILE__). '/test.php', of course, no problem, if there is no slash, such as dirname (__ FILE _...

PHP using regular expressions to verify the Chinese problem

str = People's Republic of China 123456789abcdefg; Echo preg_match ("/ ^ [u4e00-u9fa5_a-zA-Z0-9] {3,15}", strName); Run this code above to see what tips? Warning: preg_match (): Compilation failed: PCRE does not support L, l, ...

Make use of PHP code to automatically turn pages

User-acceptable language information, on _SERVER [HTTP_ACCEPT_LANGUAGE], the variable information is like this "zh-cn", if it is a multi-language column, is similar to "zh-cn, en; q = 0.8, ko; q = 0.5, zh-tw; q = 0.3 "The following questions can be solved. Code: <? Php error_reporting (E_ALL ^ ​​E_NOTIC ...

PHP comes with a unit function that can replace echo debugging

Today found a function assert and assert_options, they can be combined to complete a simple phpunit function, but it is too simple, so not much useful, but still record good. The main problem is the flexibility to define their own wrong message , Can only suggest the file and the number of rows of the problem. The specific method of use can be seen <> or <> at the same time can be combined <> "XXVI ...

php header () function detailed and practical method

php tutorial header () Function Detail Practical Methods header (string, replace, http_response_code) string Required. Specifies the header string to send. replace optional. Indicates whether the header replaces the previous header or adds the second header. The default is true (replace). false (allows multiple headers of the same type). http_response_code Optional. Http response on behalf of ...

Website is being attacked php way to prevent it

Recently the site is often attacked, and later thought of a way to use php tutorial to prevent the site from being attacked. Here is my code, the code is not the best, according to their needs to do, here's my code. / * * Anti-ip attack code website website (anti-ip attack code website) 2010-11-20, ver2.0 * mydalle.com anti-refresh mechanism * design by www.jzread.com ...

PHP will picture into mysql implementation code

php tutorial to save the image into mysql tutorial code below only tell you how to achieve how to save the image to the database tutorial, this method is not recommended. * / mysql_connect ('localhost', 'root', 'root'); mysql_select_db ('ac'); $ picdir = "/ a / ag.gif"; $ image = addslashes (file_get_contents ($ picd ...

php jump function and get the URL address of the current page

php tutorial jump function and get the url address of the current page function url_this () {$ url = "http: //". $ _ server ["http_host"]. $ _ server ["request_uri & qu ...

php date processing function (calculate time difference, conversion timestamp date)

PHP Tutorial Conversion timestamps for the common date format and calculation time difference: The default return type is "minutes" function trans_time ($ timestamp) {if ($ timestamp <1) echo 'invalid unix timestamp'; else return date ("ymd h: i: s ", $ timestamp);} // Get ip function g ...

Generate a random string, including uppercase, lowercase, numeric php code

Generate a random string, including uppercase and lowercase letters and numbers. Function randstr ($ length) {$ hash = ''; $ chars = 'abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz'; $ max = strlen ($ chars) - 1; mt _...

php anti-sql injection filter code

We provide three functions not to filter some special characters, the main is to use sql sql-sensitive string to filter out, and the following Let's look at this code. A friend in need take a look. function phps tutorial ql_show ($ str) {$ str = stripslashes ($ str); $ str = str_replace ("& # 92;", "", $ ...

Total Pages: 18 1 .... 6 7 8 9 10 .... 18 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.