《PHP教程:php實(shí)現(xiàn)SAE上使用storage上傳與下載文件的方法》要點(diǎn):
本文介紹了PHP教程:php實(shí)現(xiàn)SAE上使用storage上傳與下載文件的方法,希望對您有用。如果有疑問,可以聯(lián)系我們。
PHP實(shí)戰(zhàn)本文實(shí)例講述了php實(shí)現(xiàn)SAE上使用storage上傳與下載文件的辦法.分享給大家供大家參考.具體如下:
PHP實(shí)戰(zhàn)
<?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>
PHP實(shí)戰(zhàn)希望本文所述對大家的php程序設(shè)計(jì)有所贊助.
《PHP教程:php實(shí)現(xiàn)SAE上使用storage上傳與下載文件的方法》是否對您有啟發(fā),歡迎查看更多與《PHP教程:php實(shí)現(xiàn)SAE上使用storage上傳與下載文件的方法》相關(guān)教程,學(xué)精學(xué)透。維易PHP學(xué)院為您提供精彩教程。
轉(zhuǎn)載請注明本頁網(wǎng)址:
http://www.snjht.com/jiaocheng/10027.html