发送-将图像从 Flash 上传到 PHPServer-序列以及各种选项的优缺点
将图像上传到支持 PHP 的服务器的方法似乎有很多,很难理解各种选项以及在什么情况下最好使用其中一种。 在前端,您可以选择是否使用 JPGencode、是否使用 ByteArray、是否进一步压缩 ByteArray。 在服务器端,假设使用 PHP,可以选择是否使用第三方远程处理(ZendAMF 或 AMFphp)以及每种方法的优缺点。
我认为无论选项如何,前端的核心步骤顺序
- 都会创建一个 Bitmapdata 对象,表示要上传保存到服务器的图像。
如果使用 JPG 编码,则对 BitMapdata 进行编码,如果没有,则跳过并继续执行步骤 3。
如果使用如果使用 ByteArray ,一个新的 byteArray 对象被实例化,并使其等于 1 或 2,如果没有,则跳过并继续执行步骤 4。
连接到服务 -upload-save 图像数据
有人可以更正和/或详细说明上述内容吗?
There seems to be so many ways of uploading images to a PHP enabled server, it is difficult to make sense of the various options and under what circumstances it is prefereable to use one over the other.
On the front end you have the option to JPGencode or not, use a ByteArray or not, further compress the ByteArray or not.
On the server side, assuming one is using PHP, there is the option of whether to use third party remoting (ZendAMF or AMFphp) or not and what the pros cons of each are.
What I see as the core sequence of steps on the front end, regardless of options
- A Bitmapdata object is created representing the image that is to be uploaded-saved to the server.
If using JPG encoding the BitMapdata is encoded, if not skip and proceed to step 3.
If using a ByteArray, a new byteArray object is instantiated and made equal to either 1 or 2, if not skip and proceed to step 4.
Connect to service -upload-save image data
Can anyone correct and or elaborate on the above?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为,最简单和自然的方法是采用
ByteArray
或BitmapData
(使用getPixels
和setPixels< 可以完全互换) /code>),使用 as3corelib 将其编码为 JPG 或 PNG,然后发送..在客户端编码的优点很
对我来说最简单的事情是使用标准 URLLoader 类将其发送到服务器。 ..数据只是在
$HTTP_RAW_POST_DATA
中...没有理由在这里使用框架,除非服务器的其余部分基于上述框架之一...希望有所帮助。 ..
问候
back2dos
i think, the most simple and natural way is to take the
ByteArray
orBitmapData
(which is completely interchangable usinggetPixels
andsetPixels
), encode it to JPG or PNG using as3corelib and then send it ... the advantages of encoding on client side aremost simple thing to me, would be to send it up to the server using standard URLLoader class ... data is simply in the
$HTTP_RAW_POST_DATA
... there is no reason to use a framework here, unless the rest of your server is based on one of the mentioned frameworks ...hope that helps ...
greetz
back2dos