Php: Let's take a closer look at the PHP article release operations Example 1 article release example, because the first two chapters are string processing and regular expressions, so the focus is on using this content. First, post. php file & lt; formmethod & quot; post & quot; action & quot; viewthread. php & quot; target & quot; _ blank & quot; & gt; & l php: Details on PHP article release operation instance 1
This example shows the release of the article. because the first two chapters are string processing and regular expressions, the focus is on using these content.
First, the post. php file
Simple: purely html code. three pieces of information must be submitted and transmitted using the post method. $ _ POST ["subject"], $ _ POST ["message"], $ _ POST ["parse"] Note that the [] of parse [] cannot be removed because an array is submitted.The submitted information will be sent to viewthread. php.
GetSubject (); // call the method for obtaining the title in the document object, and the output file title echo ""; // output a separator line, used to separate the title and body content of an article echo $ article-> getMessage (); // call the method of getting the content of the article in the article object and output the content of the article subject?>
It is easy to do, but we can see how a general project is developed. HaoGe calls this interface. The principle is very simple. you only need to include this class, by calling its method, we can implement the functions we need, which is convenient and well encapsulated. large projects are split into several interfaces, and each interface does what we should do, when one person does a few jobs and then calls each other between interfaces, big projects can be basically formed.