PHP Combat Day _php Tutorial

Source: Internet
Author: User
Today is the Waterfall Flow message board front desk backstage finished. Let's enjoy it.


The things that I learned today

Serialize () serialization

Unserialize () crossdress line

By these two functions, two functions of Config_set () and Config_get () are written.


[PHP]
/**
* Used to write out the array configuration
*/
function Config_set ($fileName, $arr _var) {
File_put_contents ($fileName, serialize ($arr _var));
}
/**
* Used to read out the configuration, the return value is set out of the array
*/
function Config_get ($fileName) {
if (file_exists ($fileName)) {
Return Unserialize (file_get_contents ($fileName));
}
}

/**
* Used to write out the array configuration
*/
function Config_set ($fileName, $arr _var) {
File_put_contents ($fileName, serialize ($arr _var));
}
/**
* Used to read out the configuration, the return value is set out of the array
*/
function Config_get ($fileName) {
if (file_exists ($fileName)) {
Return Unserialize (file_get_contents ($fileName));
}
} Call method


[PHP]
$config = Array (
' Title ' = ' Waterfall Flow message board ',
"B" = ' aaaa '
);

Config_set ("data.php", $config);


$config =config_get (' data.php ');

Var_dump ($config);

$config = Array (
' Title ' = ' Waterfall Flow message board ',
"B" = ' aaaa '
);

Config_set ("data.php", $config);

$config =config_get (' data.php ');

Var_dump ($config);
The use of ' [] ' in the 2.jquery selector, and removedclass remove style, addclass add style, use this can easily make a highlight effect

var Focus_li = $ ("#menu Li[class!=nav-header]");
Focus_li.click (function () {

Focus_li.removeclass ("active"); Remove all the highlighted styles
$ (this). AddClass ("active"); Add a highlighted style to the clicked

3. About Session,unset ($_sesstion), this is not clear. To use the Session_unset ()


4. Front desk message form rewrite Chrome browser effect is good, ie words less special effects, not too beautiful


[HTML]


5. Background drop-down button, very beautiful oh.


[HTML]



Welcome back, <{$userName }>.


    • View site


    • Exit Login






Welcome back, <{$userName}>.


    • View site


    • Exit Login



http://www.bkjia.com/PHPjc/477377.html www.bkjia.com true http://www.bkjia.com/PHPjc/477377.html techarticle today is the Waterfall Flow message board front desk backstage done. Enjoy the next thing. Serialize () serialization of Unserialize () crossdress The two functions, the C ...

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