Header ("content-type: text/html; charset = UTF-8 ");
// Microtime-returns the current Unix Timestamp and number of microseconds
$ Oldtime = microtime (true );
Echo "the script running time is :";
$ V = 0;
For ($ I = 0; I I
$ V ++;
}
$
The fgetcsv () function is required for php Data in csv format.
Use the following statement
Export hd1_fopen('test.csv ', 'R ');
$ Buf = fgetcsv ($ hd, 1000 ,',');
Open a file in test.csv format. Separate the content with.
The first line
This is a registration program. when the user enters the user name, it will automatically go to the database to check whether the user's user name to be registered has been registered. if it is returned, a prompt is displayed; otherwise, the user
1. when a record is added to the background, the target html page is directly generated, and the frontend calls the connection to directly point to the generated html page. this method has the highest program efficiency. Server load is light,
1.
& Lt ;! Doctypehtmlpublic & quot;-w3cdtdxhtml10transitionalen & quot; http: wwww3orgtrxhtml1dtdxhtml1-transitionaldtd & quot; & gt; & lt; htmlxmlns & quot; http
Ajax php users do not need to log on to the
To obtain the complete address of the current page, we need to perform many operations such as http or https, php file and path, host domain name, and query parameters. Obtain the protocol-http: url protocol.
To obtain the complete address of the
Background code: // search. if 1 is not in 0 functionsearch () {$ keyword $ _ POST [& amp; #39; search & amp; #39;]; $ GoodsM (& amp; #39; goods & amp; #39;); // Here I am doing a fuzzy query...
Background code:
// Search. if the value of 1 is
After the new version is released, you can also verify it in the controller. you need to specify two variables: the rules specified in $ validate $ auto are the same as those in the model. There is always a problem when we put automatic verification
Recently I used thinkphp to create a project and used a rich text editor. a text editor does not have the same image upload function. I found many related methods on my website, but I didn't find a proper one, after constantly trying to sort out the
Add, delete, modify, and query operations on CURDAction. class. php & lt ;? Php // test the add, delete, modify, and query operations on the database classCURDActionextendsAction {// index page publ...
Adding, deleting, modifying, and querying
Method 1: Create a basic model (instantiate a database operation class that comes with the system); 2.0 later, it is more scientific and convenient. When instantiating a database operation class, you do not need to define a database operation class
1. instantiate a table. 1. create a basic model. instantiate a database class that comes with the system. UsernewModol (user) is equivalent to $ UserM (user ); 2. thinkphp will automatically help us find the table in this database, and take the
This example shows the customer information in the customer information table. After batch deletion, the user displays the page code sdel.html to dynamically obtain the user information: & lt; formaction & quot ;__ URL _/sdelete/& quot; method &
First, in index. in php, define (& amp; #39; APP_DEBUG & amp; #39;, false) must be written. second, in config. & amp; #39; HTML_CACHE_ON & amp; #39; & gt; & amp; #39...
First, define ('app _ debug', false) must be written in index. php.
2. in config.
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