Last active
December 30, 2015 00:29
-
-
Save wlyecn/7749402 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// 数据库主机 | |
define('C_DB_HOST', SAE_MYSQL_HOST_M); | |
//sae:数据库端口 | |
define('C_DB_PORT', SAE_MYSQL_PORT); | |
// 数据库用户名 | |
define('C_DB_USER', SAE_MYSQL_USER); | |
// 数据库密码 | |
define('C_DB_PASSWORD', SAE_MYSQL_PASS); | |
// 数据库名称 | |
define('C_DB_NAME', SAE_MYSQL_DB); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// smartytpl为存放缓存的文件夹 | |
$smarty->compile_dir = 'saemc://smartytpl/'; | |
$smarty->cache_dir = 'saemc://smartytpl/'; | |
$smarty->compile_locking = false; | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//... | |
// 判断文件是否存在 | |
bool fileExists(string $domain, string $filename) | |
// 获取指定domain下的文件名列表,可用于判断文件夹存在 | |
array getList(string $domain, [string $prefix = '*'], [int $limit = 10], [int $skip = 0]) | |
// 获取文件内容 | |
mixxed read (string $domain, string $filename) | |
// 将数据写入存储 | |
string write (string $domain, string $destFile, string $content, [int $size = -1], [array $attr = array()], [bool $compress = false]) | |
// 将文件上传入存储 | |
string upload (string $domain, string $destFile, string $srcFile, [array $attr = array()], [bool $compress = false]) | |
//... | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment