Now we finally have everything we need to write a new file:
Open the file and truncate the file length to 0
$open _file = fopen ("messages.html", "w");
Write header information for a file
Fputs ($open _file, $header);
A new line
(Use stripslashes
PHP Programming Common Skills Four:
1. Configure PHP file directory
As a scripting language for server-side interpretation execution, PHP programs are placed in a directory accessible to a server, and can generally be configured by modifying Apache
P> online very free to support PHP's personal home page space now a lot, then may think of a upload something, but it is free, of course, there will be a lot of restrictions, not allowed to upload, this is normal, some even mail () function is not
1. __construct ()is invoked when the object is instantiated,When __construct and a function with the class name as the function name exist at the same time, the __construct is invoked and the other is not invoked.
2. __destruct ()
Called when an
Because it's13503594262135035942621324369442913503594262138805617501340477699915675167006This format, all of which we use file to load the text directly into the array$array = file ($file);
Output with Print_r
Array([0] => 13688179054
[1] => 13652
1, PHP ADODB address way to connect the database tutorial2, PHP ADODB object way to get the database content3, PHP ADODB HTML code mode display content4, PHP ADODB realize content automatic paging function Include_once ("adodb5/adodb.inc.php
//author:heaven //File download function download ($file _dir, $file _name) //Parameter description: //file_dir: File directory // file_name: filename { $file _dir = Chop ($file _dir);//Remove extra space in the path //Draw the path of
Program Call: $page = multi (total number of records, number of display per page, current page, URL string, maximum number of pages before and after);
Stencil call: {$page}
Paging function display
function multi ($count, $TPP, $page, $url, $maxto =5
MySQL tutorial _connect ("localhost", "root", "root") or Die (' Database Server Uid or Password error! ');mysql_select_db (' IP ') or die (' Data! ');mysql_query ("SET NAMES ' gb2312 '");*/Include ("boke/inc/re_conn.php");$file = ' update.xml ';$url
$link = Mssql_connect ("127.0.0.1", "sa", "sa") or Die ("Can ' t connect SQL Server");mssql_select_db ("Cheng", $link) or Die ("Select database Failure");MySQL tutorial _connect (' localhost ', ' root ', ' root ') or Die (' database tutorial server
Ob_start: Turn on output buffering
ReadFile: Reads a file and writes to the output bufferReturns the number of bytes read from the file. If the error returns false and an error message is displayed unless invoked in the form of @readfile ().
Preliminary knowledge
Template technology:PHP Template Engine Smarty IntroductionPHP Configuration using Smarty Technology
Caching technology:
such as constant information, but still need to change the information in the cache to speed up the
After PHP5, we can solve this problem by __autoload. And after PHP5.1, Spl_autoload_register () is also provided to provide a more complete loading mechanism.
By reading the autoloading in PHP article, I understand the autoload loading mechanism,
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