I feel like I didn't sleep well. -shenmedoumeixie, sleep, feel like you're not asleep. _php Tutorials

Source: Internet
Author: User

I feel like I didn't sleep well. -shenmedoumeixie, sleep and feel like you're not asleep.


Hi

Last night did not sleep well, although the dream is very fragrant, but does not sleep well does not have the spirit to do the research ah ...

1. JQuery

12. Enable Chat room creation

12.1 Basic Functions

Landing

No refresh real-time communication;

Support Emoticons.

12.2 Approximate effect

Landing-"verification, intended to use Ajax to do;"

Chat-PHP implementation of specific functions on the line.

12.3 Data Stream Analysis

Login page: Get username and password Request Login-return to the chat page or failure information and landing page;

Chat page: Request and return of chat content (Implementation of update data without refresh), request and return of online personnel information, processing request for sending content, writing to chat content.

12.4 Landing Page Development

--------suddenly discovered the need for Ajax knowledge reserves, but I do not want to see Ajax today, the weekend to come again ... -----------

2, PHP implementation of the page static (a)

Introduction of static

1.1. Dynamic pages and static pages

Dynamic: Perform dynamic programs, php,jsp, etc., such as PHP, parsing, compiling and running.

Static: HTML and other files.

1.2, about optimizing page response time

--Main means

Dynamic page Static-The focus of this section;

Optimize the database;

Use load balancing;

Use caching;

--Dynamic page static

scene : Some content in the page is not changed frequently;

The essence: Generate static HTML files ; (Reduce the execution steps and save time)

Reducing the response time, it is important to reduce the server burden.

Not suitable for microblogging and other updates faster.

1.3 About dynamic URL address setting static form

Http://state.com/index.php?c=play&a=index&id=8123

Into

Http://state.com/play/8123.shtml

This process is still pseudo-static (actually a dynamic file, just changed a vest).

1.4 php Static

--Pure static

A real static file generated by a PHP program.

Also divided into local pure static (/local dynamic, the implementation method may be asynchronous operation of Ajax) and global pure static.

Pseudo-Static

Convert the URL address into HTML-like situations.

Second, pure static case implementation

2.1 Buffer

--Overview

is actually a buffer , a memory address space, for storing data.

To implement static, expand around buffer.

For example, the buffer in the computer system, when there is data to be stored operations, you need to put a buffer full before writing to disk.

--Process

Content--php buffer--tcp--Terminal

--Using

Echo 1;echo "
";
Echo ob_get_contents ();

If it's not turned on, either change php.ini or add a header file

Ob_start ();

2.2 Achieving pure static

--Basic mode

File_put_contents ()

Output_buffering ()

http://www.bkjia.com/PHPjc/1078682.html www.bkjia.com true http://www.bkjia.com/PHPjc/1078682.html techarticle I feel like I didn't sleep well. -shenmedoumeixie ...., sleep feel oneself not asleep hi last night did not sleep well, although the dream is very fragrant, but sleep not good do not have the spirit to do scientific research ah ... 1, jQuery 12, realize chat ...

  • Related Article

    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.