Use GoogleAPI to write a php code for viewing weather forecasts
Forecast_information-> city; if (isset ($ xml ['weate']-> problem_cause) {$ problem = (array) $ xml ['weate']-> problem_cause; echo $ problem ['@ attributes'] ['data']; return;} $
Fast sorting algorithm
Function qsort (& $ arr) {_ quick_sort ($ arr, 0, count ($ arr)-1);}/*** uses a recursive algorithm for fast sorting. ** @ Param array $ array to be sorted by arr * @ param int $ low: Lowest sort Sub-Segment * @ param int $
Php code for init () of zendframework:
/* First, let's take a look at the execution sequence of the class constructor. next we will introduce my code structure; */class Action extends Zend_Controller_Action {} class IndexController extends Action
This article mainly introduces the internal multithreading of PHP multithreading. The example analyzes the usage skills of php multithreading and has some reference value, for more information, see the next article. This article mainly introduces
Php query IP geographic location (dat database)-pure IP database can search and download pure IP database on the Internet, and then use the following function to call getaddress ($ ip) returns detailed geographic location information.
PHP
How to add data DB: insert and update data DB: update query DB: query delete DB: delete 1. add data DB: insert
$ Uid = empty ($ _ POST ['uid'])? "": $ _ POST ['uid'];
$ Username = empty ($ _ POST ['username'])? "": $ _ POST ['username'];
$
PHP calculates the number of all daffodils less than 1000
PHP calculates the number of all daffodils less than 1000
The number of daffodils is the number of n (> = 3) digits, which is equal to the sum of the n power of each number. for example, 1
Php + js cut pictures online, client Mouse frame part of the current Google browser test basically passed, other did not pass. The JS code is still to be modified.
2. [File] cut.html
Cut My Picture Left BEFORERight AFTERX pointPOINT
Baidu ping service CDN website includes php code
Jump
WeblogUpdates. extendedPing
Tongnan Forum
Http://www.tongqiong.com
Http://www.tongqiong.com/read.php?
Scale down an image watermark
/*** Image scaling watermark class ** @ version 1.0; **/class cls_photo {protected $ waterrate = 0.2; // proportion of the watermark icon on the image protected $ width = 300; // Default width of the thumbnail
Phpajax achieves three levels of provincial/municipal linkage
2.
[Code][PHP] code
Jump
public function getdiqudaima(){$rs = $this->db->table('diqudaima') ->field("province,city,zonename,zonecode") ->where("areaid=1 ")
This article mainly introduces php's method of intercepting Chinese characters by character without garbled characters, and involves php's skills in operating Chinese and English strings, which is of great practical value, for more information, see
Strip_tags extended function-processing html (for collection)
Strip_tags extended function-processing html (for collection)
/*** This function turns HTML into text * converts html to txt */function html2txt ($ document) {$ search = array ('@
]
PHP methods for obtaining webpage content 1: get content using file_get_contents
Method 2: Use the file_get_contents function to obtain the url in post mode.
'bar');$data = http_build_query($data); $opts = array ('http' => array ( 'method' =
A simple log record action on the background of a website, similar to the lang_message language pack function of UC. with this function, you can easily manage categories.
Public function lang_message () {return $ _ action = array (// login 'login' =
If you directly access the PHP page that allows the software to read updates, the public information is displayed. if you access the page with a p value, the hidden information is displayed.
It's not a new idea. I just wrote a small software that
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