The HTTP class is below the directory thinkphp/lib/org/net. Now let's see how it's called.
Copy the Code code as follows:
Import ("Com.Buyback.QueryAmazon");Import ("ORG.Net.Http");Class Image {public static function GetImage ($ISBN)
One, gets the UNIX timestamp for the specified date
Strtotime ("2009-1-22") examples are as follows:
1.echo strtotime ("2009-1-22")
Results: 1232553600
Description: Return January 22, 2009 0:0 0 seconds timestamp
Second, get the English text date
Let's look at a ternary operation:
Copy the Code code as follows:
$a =1; $b =2; $c =3; $d = 4;echo $a ?>
Generally in other languages (such as C or Java) Rules, the above code of the Operation logic is:
Copy the Code code as follows:
$a
After a period of debugging analysis, found that there is a function to write a very messy, it is estimated that the revision of the time has not changed, after a period of time to modify debugging, finally the normal generation of the 4-level page,
Copy CodeThe code is as follows:
# Execution format without parametersPHP installation directory/bin/php scriptname.php# Execution format with parametersPHP installation directory/bin/php scriptname.php [parameter 1] [parameter 2] .....Access
Copy CodeThe code is as follows:
/*Author:ssh_kobedate:20110602Shortage: If the picture path in the page is not an absolute path, you cannot crawl*/Set_time_limit (0);//crawl is not limited by time$URL = ' http://pp.baidu.com/';//any URLGet_pic ($
PHP Face question Description:
Example: My name is Fanglor = "ym Eman si Orlgnaf
Answers to the PHP interview questions:
Copy the Code code as follows:
function Restr ($STR){$str 1 = Explode ("', $str);$str 2 = ";$temp = ";for ($i =0; $i
{$str 2.
Copy CodeThe code is as follows:
Class Controller_jobs extends controller_base{Public function before () {Parent::before ();if (Request:: $protocol! = "CLI") {Die ("Only CLI allowed!\n");}}Public function after () {Parent::after ();Do some
The main difference is that if the same key name appears in two or more arrays, the key name is a string or a number, you need to be aware
1) When the key name is a number, array_merge () will not overwrite the original value, but the + merge array
However, some cases only need to pass a few files, and the file volume is not too large, in this case the use of components is a bit sledgehammer to kill the chicken feeling, through the HTML comes with the
form can achieve the required functions,
Copy CodeThe code is as follows:
Here you can set up multiple users$passwd = Array (' ha0k ' = ' ha0k ',' HACKERDSB ' = ' HACKERDSB ');/* Set the alias of the command here */$aliases = array (' ls ' = ' ipconfig ',' ll ' = ' ls-lvhf ');if (!isset
foreach is the operation of an array copy (by copying the arrays), while the while is manipulated by moving the internal indicators of the array, which is generally considered to be faster than foreach (because the foreach first copies the array in
1, the index is not built well;
2, SQL writing is too complex;
3, configuration error;
4, the machine does not load;
1. The index is not built.
If you see that MySQL consumes a large CPU, you can use the MySQL client tool to check it.
Execute under
Definition and usage
The function of the Clearstatcache () is to clear the file state cache.
PHP's cached data is advantageous for faster and better running functions. If a file has been tested multiple times in a script, you may be prevented from
Configuration of the 1,smarty cache:
$smarty->cache-dir= "directory name"; Create a cache directory name
$smarty->caching=true; Cache is turned on, false when caching is not valid
$smarty->cache_lifetime=60; Cache time in seconds
Use and purge of
Note: Visitfile () has minor modifications
Copy the Code code as follows:
View files for a specified folder$fileList = Array ();function Visitfile ($path){Global $fileList;$path = str_replace ("\ \", "/", $path);$fdir = Dir ($path);while (($file =
A good source of code such as DZ Forum, Wind Forum, Empire Cms,dedecms, etc., have their own set of design ideas and design patterns, so before looking at a product to do a good job of psychological preparation, you can compare their own experience
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