Database design
First prepare two tables, the PIC table holds the picture information, including the corresponding name of the picture, the path and the picture "like" The total, pic_ip is the user clicks on the IP data.
CREATE TABLE IF not EXISTS
The code is as follows
Copy Code
/*socket send and receive data@host (string) socket server IP@post (int) port@str (string) the data to send@back 1|0 socket end has data returnReturns true|false| server-side data*/function
Through the Curl functionCurl function library in PHP (Client URL library function)
Curl_close-closes a Curl sessioncurl_copy_handle-copies all the contents and parameters of a Curl connection resourcecurl_errno-returns a numeric number containing
Array is used as the parameter of the sort function, and after sorting, the array itself is changed, and the return value of the function is bool type.
2 function name appears single A association, meaning, in the process of ordering by value,
The design of the databaseDesign Three tables: poll results tables (count_voting), Voter Records (ip_votes), User table (users)
The results of the poll were used to count the final voting records, and I gave it 4 fields: the name of the item
For example, there is a scenario where a referral message is sent to 1000 users, the user enters or imports a mail account, and the submitting server performs the sending.
The code is as follows
Copy Code
$sqlserver/42852
In general, it is more logical to define the attributes of a class as private. However, read and assign operations on attributes are very frequent, therefore, in PHP5, two functions "__get ()" and "__set ()" are predefined to get and assign their
The code is as follows
Copy Code
Connecting to a database$conn = mysql_connect ("localhost", "phpdb", "phpdb");mysql_select_db ("Test", $conn);?>?Get the parameters of a Web page$id =$_post[' id ']; Determine if the user name
The code is as follows
Copy Code
MySQL tutorial _connect (' localhost ', ' 0731-cn ', ' 0731licheng1 ') or Die (' sever ');mysql_select_db (' 0731-cn ') or Die (' Database error ');$sql = "Select uid from member";$query = mysql_query
Due to the historical reasons for the Internet, Apin is responsible for the overall network IP planning as well as the North American region also has some of Africa's IP allocation governance, and accordingly, whois.apin.net is the IP whois root
How to use1 Create a Web project, named Jqueryuploaddemo, download the latest version from the official web and add it to the project after decompression2 Add the Uploadhandler.ashx file to the project to process the upload of the file.3 Add the
Php. ini: a perfect solution for uploading large files1. Open php. ini (not to mention opening the method, Baidu has a lot)2. Search for post_max_sizeMaximum form submission value. This parameter is not used to restrict the size of a single file to
If you call the json_encode () function that comes with PHP, when you encounter a Chinese character, the Chinese character will be escaped. For example:Echo json_encode (array (' '));// Output: ["\ u4f60 \ u597d"]This is very annoying, like a bunch
When creating an interface, use file_get_contents to show HTTP request failed! HTTP/1.1 505 HTTP Version Not Supported error. Check the manual,Note: If you want to open a URL with special characters (such as spaces), you need to use urlencode () for
Method 1: modify the server configuration and modify the php. ini configuration file. error_reporting = E_ALL &~ E_NOTICEMethod 2: error_reporting (E_ERROR | E_WARNING | E_PARSE) is added to the page header; error_reporting (E_ALL & E_NOTICE); or
The following prompt appears when running phpinfo:PHP Warning: phpinfo () has been disabled for security reasons in XX. php on line XXThis section tells us that the phpinfo () function is disabled due to security considerations. If you have the
When I started the php environment today, I found that mysql module functions were not available and the website returned the 500 error. View the error log in apache. The following error message is found:PHP Warning: PHP Startup: Unable to load
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