PHP + FLASH has made an online camera to take a photo. how can I save the image to the local camera and call it? I have already written it, because there are many photos taken, now I want to save the photo taken by the camera locally and upload it via FTP. The problem is that after the photo is taken, I don't know how to save it locally. please give me an example, I am very grateful for your consideration!
Reply to discussion (solution)
Save it to the web server. you can download, delete, or create a photo. From the security perspective, the browser should not allow flash to operate files on the local machine.
The current system requires cameras to take photos. the examples I have found on the Internet are stored on the server. now there must be a local image. how can this problem be solved? This step gets stuck.
Either use javascript + html5 to try it, or directly upload it to the server to reduce the photo resolution. generally, 640*480 is enough, because the resolution of most users' cameras is so high, the real-time data upload speed is acceptable.
In addition, browsers and Flash controls are not allowed to read local file systems.
If Flash cannot read or write local files, what is the use of Flash?
JavaScript is acceptable (only the security warning dialog box is displayed)
What functions does JS need?
It should only be stored on the server and automatically stored on the client computer. it should not be very realistic. you can use the second-floor method, you need to click download before uploading, or directly use the ftp function of php to upload data from the server to the target server. the only way to save the data to the client is to download the data from the server.
Http://www.baidu.com/baidu? Word = flash % E5 % 86% 99% E6 % 96% 87% E4 % BB % B6 & ie = UTF-8
Always learning php Cainiao
It seems that the idea of the landlord should be changed ?? Flash converts an image into a data stream (a class can be used directly, such as JPGEncoder), and then submits it to php for saving, flash cannot save files (except for desktop project-air ).
Saving files in php is not difficult.
I have done a similar project before, but unfortunately I can't find anything. I am using PHP to save files.
The code involves the file storage path.
Close the post now. thank you for your answers. it is very helpful to me. For this problem, I have changed the method to save a single copy on the WEB server and then store it on the target server using FTP.