Php advanced programming-function-Zheng Achi. For more information about php learning, see. 1. php functions
1. user-defined functions
The code is as follows:
Function name ([$ parameter, [,…])
{
// Function Code
}
Note: the function name cannot
PHP ZipArchive compressed files and download the packaged files. This article briefly introduces how to zip archive files in PHP and download the packaged files. for details about how to package php files, refer to section 5. Analysis of technical
Delete files in PHP
Include ("conn/conn. php ");
$ Id = $ _ GET [id];
$ Tupian =$ _ GET [tupian];
$ User = new shanchu ();
$ User-> delFileUnderDir ();
$ SQL = mysql_query ("delete from image where id = $ id ");
Class shanchu {
// All objects in
Php + mysql implements user registration and login, and mysql User registration. Php + mysql implements user registration and login methods. mysql User registration examples in this article describe how php + mysql implements user registration and
This article mainly introduces the function of sending text messages when goods are sold based on PHP. The code is simple and easy to understand. If you need it, you can refer to a project recently, where you need it, we are required to implement
After I use the add method to submit data, the database is always unable to insert the data I want to insert. The data submitted by the html {code...} post method can be obtained in the following method, that is, add does not enter add {code...}.
This error is reported every time you prepare to redirect back to another method in the same controller. Why? If a system error occurs, you can select [retry] [Return] or [return to the homepage] [error message] to operate the admin {code...}
This problem has plagued me for several days. The following figure shows how to jump to the query page after the data is submitted in the form, but it does not show that the inserted data database has been inserted, but if it is opened separately
No matter what data is submitted, the content in the image is inserted, that is, the name itself is inserted, and the name value is not inserted. Why? Can someone help me with my code? Thank you! This is 1.php{ code...} This is 2.php{ code ...}
No
I have a login interface. If the user name does not exist when entering the user name, a registration prompt is prompted, but it is clear that I may not know the SQL statement, so there is always a problem, even if you enter a user name that does
Some time ago, I was doing a winning activity, and I used it to write data into the session after winning the prize, and then the user submitted the data for verification, the following is not a similar example. Some time ago, I was doing a winning
Welcome to the Linux community forum and interact with 2 million technical staff to access the php file upload code :? Phpif ($ _ FILES [myfile] [name]!) {If ($ _ FILES [myfile] [error] 0) {echo error status:. $ _ FILES [myfile] [error];} else {move_
This article mainly introduces how to add data in batches and update data in batches in php. It involves flexible use of Form Processing and SQL statements, which is of great practical value. For more information, see
This article mainly introduces
This article describes how to use PHP to pop up a prompt box and jump to a new page, that is, what you think is redirection. for the following example, you can refer to the next two days to write a demo, you need to use prompts and jump, the main
This article mainly introduces php multi-file upload and download examples. For more information, see
The code is as follows:
Index_uploads
Index_uploads.php
The code is as follows:
Echo"
"; print_r($_FILES); echo "";
$ Count =
Php implements batch data addition and batch data update. php adds data. Php batch addition of data and batch update of data implementation method, php to add data this article instance describes the php batch addition of data and batch update of
In the PHP pop-up box, jump to the new page and redirect to the new page. This article describes how to use PHP to pop up a prompt box and jump to a new page, that is, what you think is redirection. for the following example, you can refer to the
Php + mysql implements user registration and login methods. Php + mysql implementation of user registration and login methods this article mainly introduces php + mysql implementation of user registration and login methods, can achieve simple user
PHP file packaging and downloading: Use the ZipArchive zip file that comes with PHP and download the packaged file. Summary:
Four headers () are required for downloading files using PHP. For more information, see my another blog post: how PHP
The specified statement cannot be deleted. it is always strange to delete it from the last one. [code = PHP] [/code] formid = & quot; form1 & quot; name = & quot; form1 & quot; method = & quot; post & quot; action = & quot; li cannot delete the
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.