PHPjQueryhtml5 avatar image selection and upload is a PHP image interception and upload function implemented using HTML5jquery. It can be widely used in avatar image cropping and uploading. In the HTML5 environment, it can be easily transplanted to mobile APPs for use.
PHPjQueryhtml5 avatar picture selection and upload usage methodDrag the mouse to intercept the selection, and the selected area will be highlighted. After interception, the file size, file type, image size, image width, and image height will be automatically obtained. Then click the "Upload Image" button. After uploading, you can see the before and after uploading. Comparison of pictures after uploading.
Things to note when selecting and uploading avatar images in PHPjQueryhtml5 1. This source code runs in the HTML5 environment, so please test it in Chrome, Firefox, 360 Speed, Opera and other browsers. It may cause exceptions under IE.
2. Please take a screenshot before uploading the picture.
3. To limit the type and size of uploaded images, please modify the upload.php file. 4. Fixed the upload directory problem.