Php 使用WCF将文件上载到服务器
我已经使用Php 使用WCF将文件上载到服务器,php,android,wcf,file-upload,Php,Android,Wcf,File Upload,我已经使用PHP从智能手机上传了一个文件到服务器。这个PHP端仅用于测试(因为我正在测试我的android应用程序是否正常工作…),客户端和/或服务器端没有问题 但是我的主要任务是在WCF中编写这个服务器。。。我不知道该怎么做 我的PHP代码如下所示: <?php // Get image string posted from Android App $base=$_REQUEST['image']; // Get file name posted from And
PHP
从智能手机上传了一个文件到服务器。这个PHP端仅用于测试(因为我正在测试我的android应用程序是否正常工作…),客户端和/或服务器端没有问题
但是我的主要任务是在WCF
中编写这个服务器。。。我不知道该怎么做
我的PHP代码如下所示:
<?php
// Get image string posted from Android App
$base=$_REQUEST['image'];
// Get file name posted from Android App
$filename = $_REQUEST['filename'];
// Decode Image
$binary=base64_decode($base);
header('Content-Type: bitmap; charset=utf-8');
// Images will be saved under 'www/imgupload/uplodedimages' folder
$file = fopen('uploadedimages/'.$filename, 'wb');
// Create File
fwrite($file, $binary);
fclose($file);
echo 'Image upload complete, Please check your php file directory';
?>
如果你知道,请帮助我。。。事实上我会发疯的:(
任何评论和/或回答,请谅解
非常感谢