powerpoint2003 official Download free full version PHP tips collection, every phper to show off

Source: Internet
Author: User
This post is mainly for all the phpers to their own in the development or learning of some of the experience and skills to summarize, mainly to solve a certain kind of thing better way to tell everyone.
I'll say a few first:
1, if you use echo to output a simple statement, similar to:

Copy the Code code as follows:

echo "Hello world!";
?>
Then you can slack off and write this:


2,str_replace () can be replaced with an array, such as:

Copy the Code code as follows:

$string = "Welcome to the phpchina.com, with A good time.";
$search = Array ("Welcome to the Phpchina.com", "has A good Time", ".");
$replace = Array ("PHP is very good", "I like It", "!");
$newstring = Str_replace ($search, $replace, $string);
echo $string. "
";
Echo $newstring;
?>


You don't have to hide your experience. Oh, ^_^!
How small is the skill?
I remember the function that sent this cache variable the cache directory is required to have read and write permissions for the caches. There is also a function to refresh the timer before writing it out otherwise it would appear that this technique is too large in fact and DZ's refresh mode is more like

Copy the Code code as follows:

function Getquerycache ($key) {
$cacFile = "cache/". $key. ". PHP";
if (file_exists ($cacFile)) {
@include ($cacFile);
return $cacValue;
}
return false;
}
function Setquerycache ($key, & $result) {
$cacFile = "cache/". $key. ". PHP";
$fp = fopen ($cacFile, "w");
if (false! = $fp) {
Fwrite ($fp, " ");
Fclose ($FP);
return true;
}
return false;
}


The above describes the powerpoint2003 official download free full version of the PHP tips collection, each phper to show off, including the powerpoint2003 official download free full version of the content, I hope that the PHP tutorial interested in a friend helpful.

  • 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.