欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

php實(shí)現(xiàn)SAE上使用storage上傳與下載文件的方法

 更新時(shí)間:2015年06月29日 16:14:39   作者:林蛤蛤  
這篇文章主要介紹了php實(shí)現(xiàn)SAE上使用storage上傳與下載文件的方法,實(shí)例分析了基于SaeStorage類實(shí)現(xiàn)文件傳輸?shù)募记?需要的朋友可以參考下

本文實(shí)例講述了php實(shí)現(xiàn)SAE上使用storage上傳與下載文件的方法。分享給大家供大家參考。具體如下:

<?php
if ($_FILES["file"]["error"] > 0)
{
 echo "Error: " . $_FILES["file"]["error"] . "<br />";
}
else
{
 echo "Upload: " . $_FILES["file"]["name"] . "<br />";
 echo "Type: " . $_FILES["file"]["type"] . "<br />";
 echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";
 echo "Stored in: " . $_FILES["file"]["tmp_name"];
}
$s =new SaeStorage();
$i='PDF/'.$_FILES['file']['name']; //文件名
$domain='store'; //storage名
$s->upload( $domain , $i ,$_FILES['file']['tmp_name'] ); //上傳
?>
<html>
<body>
<form action="test3.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form>
</body>
</html>

希望本文所述對(duì)大家的php程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論