php upload image and generate the specified size map

- php tutorial to upload pictures and generate the specified size chart in proportion This is an image thumbnail function Oh, upload a new picture to $ srcfile Then file $ thumbwidth thumbnail width maximum size and $ thumbheitht thumbnail image maximum size Generate a thumbnail. Image thumbnail function parameters: $ srcfile original address; $ dir new map directory $ thumbwidth thumbnails width maximum size $ thumbheitht thumbnails thumbnails ...

Easy PHP output excel

To output PHP data to an excel spreadsheet, PHP has great support in this area, and PHP can output a simple excel form in just a few simple sentences. PHP Code: header ("Content-type: application / vnd.ms-excel"); header ("Content-Disposition: attachment; filename = users.xls & qu ...

php modify the file name function

In the php tutorial there is a function to change the filename, rename ($ o, $ n), $ o is the old filename, and $ n is the new filename to be modified. Now let's look at an example of a filename that is named "? Php session_start (); if ($ submit ==" submit ") {if (file_exists ($ old_name)) {if (rename ($ old_name, $ new_name )) // ...

PHP files to create, copy, move, delete files

<head> <meta http-equiv = "content-type" content = "text / html; charset = gb2312"> <title> Creating, Copying, Moving and Deleting Files </ title> <style type = "text / css Tutorial "> <! -...

Php weather forecast code collected from the Central Meteorological Observatory covers the whole country

Php tutorial weather forecast code collected from the Central Meteorological Observatory coverage of the national weather forecast information collected from the Central Meteorological Station, accurate information, wide coverage, the code is simple. Return json code can be used for client calls can also be displayed in the server-side processing, the author of the WordPress weather forecast plug-in is the use of this code Oh. Note that this code will be generated in the server cache file, you need to create a new data folder in the current directory, to ensure that the folder can be written ...

php filter dangerous html function code

php tutorial to filter dangerous html function code 1, delete html comments; 2, delete the script, link, object, embed, iframe, frame, frameset and have on the beginning, contains the page effects: [^; , Delete css tutorial notes (to prevent the use of this to deceive delete expression, I do not know if there are other ways to cheat delete expression); 4, delete expr ...

Two PHP export excel examples

Two php tutorials export excel instance <? Php header ("content-type: application / vnd.ms-excel; charset = gbk"); header ("content- disposition: attachment; filename = test_data.xls" ...

PHP pseudo-static four methods summary

PHP pseudo-static use is mainly to hide the passed parameter name. Today we introduce to you a total of four pseudo-static PHP method, I hope we can further deepen the understanding of PHP pseudo-static through these four methods. The following is the full method code: [pre] <? Php // pseudo static method a // localhost/php100/test.php?id|1@action|2 $ Php2Html_Fi ...

PHP session never expire to solve ideas and methods

Let PHP session never expire, you may not have encountered such a depressing problem, but I encountered, very depressed. We developed a system that only corporate customer service staff can use - a limited number of customer service staff. This is a limited number of customer service staff a few days ago suddenly raised such a problem: We every very short period of time (half an hour does not operate the page), are anxious to solve customer problems, the system has prompted the need to log in, delayed The customer's time ... This is unhappy! The customer is God, the only God. So on the peak requirements we can really ...

PHP kanji alphanumeric underscore regular expression

^ s * | s * $ Comment: Can be used to delete the first line of the first line of the whitespace characters (including spaces, tabs, page breaks, etc. ), A very useful expression $ action = trim ($ _ get ['action']); if ($ action == "sub") {$ str = $ _post ['dir']; & ...

php regular expressions matching Chinese characters

Php tutorial Chinese characters match the regular expression Chinese characters match the regular expression: [u4e00-u9fa5] Commentary: Matching Chinese is really a headache, with this expression is easy to match the double-byte characters (including Chinese characters ): [^ X00-xff] Comment: Can be used to calculate the length of the string (a double-byte character length meter 2, ascii character meter 1) * / $ str = "singlepoint single point log"; if (preg_matc ...

php filter non-site links

This tutorial is a use php regular expressions to filter non-site link instance. * / php $ neirong = preg_replace ("/ <a (?! [^ <>] *? [^ <>] *?>). *? </a> / si", "", $ bbb); echo $ neirong; Method two $ str = '& ...

php mysql database backup procedures

Database Mysql Sql Sqlserver Database mysql database backup procedures / * Provide an example of php mysql database backup procedures, a good way to your database online real-time backup, so that you can save the database security, and he is saved as a .sql file The database backup file that is also generated in the bakdata directory is also dated. * /?> <! doctype html public "- // w3c // dtd xhtml 1.0 transitio ...

PHP gets form feed textarea data in the line breaks

Nothing else, see an article on the PHP form conversion textarea line breaks, after reading, based on past experience, I feel some of the information in this article is not accurate ... So I personally php Get form data in the newline character for research test Page code: <! DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Transitional // EN" "http ...

php form conversion textarea newline method

Today in the project encountered a textarea wrap problem, debugging for a long time have not been resolved. To textarea in the carriage return line into br into the database. Here is my solution to this problem, the final count is completely understood, it is almost capsize in capsize 1. Must know that the textarea in the newline is n (personal test found by the Enter key is n, as if under linux rn ) 2. Before using nl2br, carefully read the manual carefully, I was depressing, generally understood as the n into a ...

Configure PHP + WAP mobile website development environment

1. Mobile terminal with WAP user agent function (such as WAP mobile phone), send WAP service request to a website through micro-browser running inside. The request is first intercepted by the WAP gateway, encoding and compressing the information content to reduce the network data traffic, and at the same time converting the WAP protocol into the HTTP protocol according to the requirement. 2. The protocol forwards the processed request to the corresponding WAP server. In the WAP server, according to the attributes such as page extensions, the requested page directly or by the server-side script to explain the output, and then returned to the user through the gateway. introduced...

PHP code to empty the HTML tags in the string

This article describes PHP empty string html tags Tag: HTML, HTML, HTML Category: html function clear_html_label ($ html) {$ search = array ("'<script [^>] *?>. *? </ script & g ...

php filter illegal character function

php tutorial to filter illegal character function $ str = "<a> fdafsa '' & # x </a>"; echo htmlspecialchars ($ str); / * & (and) into & amp; ; <(Less than) turn into <> (greater than) turn into & g ...

php generate random password several ways

Use PHP to develop applications, especially web applications, often need to generate a random password, such as user registration to generate a random password, the user also need to reset the password to generate a random password. Random password is a string of fixed-length string, where I collected several ways to generate a random string for your reference. Method 1: 1, in 33 - 126 to generate a random integer, such as 35, 2, 35 will be converted to the corresponding ASCII characters, such as 35 corresponding to # 3, repeat the above 1, 2 steps n times, connected ...

php $ HTTP_COOKIE_VARS Instance voting information restrictions

php tutorial $ http_cookie_vars Example Voting limit if ($ http_cookie_vars ["vote"]) {echo "<script> alert ('You have voted, please do not repeat the vote'); history.back (); </ script > "; exit;} $ vcount = $ _ pos ...

Total Pages: 18 1 .... 11 12 13 14 15 .... 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.