ECAE平台提供的文件存储模块。
查看API file
上传文件实例
index.html
<html> <body> <form action="upload_file.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>upload_file.php
<?php
$file = $_FILES["file"];
$group_id = 'public';
$local_file = $file['tmp_name'];
$options = null;
# 保存文件信息
$file_id = ecae_file_save($group_id, $local_file, $options);
# 查询文件信息
var_dump(ecae_file_fetch($file_id, $local_file));
echo '<hr/>';
# 查看文件URL
var_dump(ecae_file_url($file_id));
echo "<hr>";