When I found PHP learning resources on the Internet, I visited Openphp.cn. As far as I know, the webmaster of the website is proficient in PHP. it is worth learning. He wrote this article about several PHP books and some PHP-related resource links.
Example I wroteCopy codeThe Code is as follows: Require ("adodb/adodb. inc. php ");$ Conn = newadoconnection ('mysql ');$ Conn-> connect ("localhost", "root", "2027205", "bh38") or die ("connection failed ");$ Conn-> execute ("set names gb2312 ");$
Add ob_start () to the header file when you cannot switch// Write global variablesSession_start (); // after data cannot be submitted, add: extract ($ _ POST); extract ($ _ GET); extract ($ _ SESSION );Session_register ('pt _ usr_nm '); // write the
Build a simple interaction website (2)5.5 countersLet's add a counter to the homepage. This example has been mentioned many times, but it is helpful to demonstrate how to read and write files and create your own functions. Counter. inc contains the
/*+ ------------------------------------------------------------------------------- +| = Read this article for Haohappy | = Notes in the Classes and Objects chapter| = Translation-oriented + personal experiences| = Do not repost it to avoid
I will share this with you. If you need it, you can directly download the following plug-in.Usage: Select backup data in cnblogs and export an XML file to the local device;Download the plug-in the attachment and install it in the \ wp-content \
1. Use DOM to generate and read XML filesInstance 1:Copy codeThe Code is as follows:// Creates XML string and XML document using the DOM$ Dom = new DomDocument ('1. 0 ');// Add root-$ Books = $ dom-> appendChild ($ dom-> createElement_x_x ('books '))
By default, php sessions are stored as files on the server side and variables are saved using cookies on the client side. This may cause a problem. When a user closes the browser cookie for some security reasons, session-related operations in the
I wrote an article a few days ago and used the php-excel-reader class to import the excel content. By the way, I used simple excel to export some excel files. This is a simple export xls class, very useful!Simple excel source code is as follows:Copy
How does php obtain the xml data of the request, the xml data submitted by the other Party through the http post protocol, and how does php obtain the xml data?Copy codeThe Code is as follows:$ Xml_data = ' '.' '.' 1234567890 '.' lgsoftwares '.'
Copy codeThe Code is as follows:/** Function: similar to substr, it does not cause garbled characters.* Parameters:* Return value:*/Function utf8_substr ($ str, $ start, $ length = null ){// The screenshot is intercepted normally first.$ Res =
Eval definition and usageThe eval () function calculates the string according to the PHP code.The string must be a valid PHP code and must end with a semicolon.If the return statement is not called in the code string, NULL is returned. If a parsing
Select collationproperty ('Chinese _ PRC_Stroke_CI_AI_KS_WS ', 'codepage ')The return value is 936, Which is GBK encoding.GBK, simplified Chinese, 936950 traditional Chinese BIG5437 US/Canada English932 JapaneseKorean 949866 Russian65001 unicode UFT-
1. nginx configuration file path Generally, when installing nginx, the default path of the configuration file is/usr/local/nginx/conf/nginx. conf.We can use a link file to direct the conf directory to a specific directory for convenient management.
Remember, you can use it directly when you need to use it in the future, or you can click here to view this article.Copy codeThe Code is as follows:// Method 1:Function extend_1 ($ file_name){$ Retval = "";$ Pt = strrpos ($ file_name ,".");If ($ pt)
Copy codeThe Code is as follows:/* UTF-8 Chinese Character truncation Program */$ Str = "123 this is a test string ";$ Str1 = "()()";Echo subUTF8str ($ str, 0, 3). " ";Echo subUTF8str ($ str, 0,4). " ";Echo subUTF8str ($ str1, 0, 4). " ";Echo subUTF8
The main function is to display the size of Beibei Based on Beibei's date of birth, and display Beibei's growth in real time.The current time is used to subtract the date of birth, but the age, months, and days are displayed.The daily algorithm is a
You can see a question on the Internet:
The result of array ("a") + array ("B") is ___
A. array ("a", "B ")B. array ("B", "")C. array ("B ")D. array ("")
Answer: D
Why does the result remain unchanged when the php arrays are added?
Because they are
Copy codeThe Code is as follows:/** Created on 2010-10-27* BY QQ542900563* Copyrights Reserved 2000-2020* This example shows how to generate an image watermark.*/// Load two images respectively$ Im = imagecreatefromjpeg ("liu.jpg ");$ Img2 =
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