Study notes: PHP Upload image code Details _php Tutorial

Source: Internet
Author: User
Tags ftp client ftp protocol
Want to know the upload image code how to write, below I will take you to detailed analysis of it. With PHP, you can always have a number of ways to accomplish a particular task. Let's take a file upload for example. Of course, you can use HTTP file uploads in the traditional way, transferring files directly to the Web server disk.

You can also upload in a more exotic way, upload it in two steps with the FTP protocol: from your local hard drive to the Web server, and then to the FTP server. PHP supports both FTP and HTTP uploads natively, so you can make the best choice based on your application's design needs. Using PHP's FTP functions for file transfer is almost identical to using a traditional FTP client-you'll see that the name of the hyphen is similar to the standard FTP command. And everyone to share the PHP upload image Code of small examples, I hope you have a lot of advice hehe thank you for learning together!!

PHP Upload Image code:

 
 
  1. Phpsession_start (); ?>
  2. PHP
  3. $ ID = mysql_connect (' localhost ', ' root ', ' 585858 ');
  4. mysql_select_db ("Okhwyy", $id);
  5. mysql_query ("setnamesgb2312");
  6. ?>
  7. < HTML >
  8. < Head >
  9. < metahttp-equiv metahttp-equiv = "Content-type" C >
  10. < title > restrict the format of uploaded images title >
  11. < Styletype Styletype = "Text/css" >
Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.