
* strcat - Append one %NUL-terminated string to another
* @dest: The string to be appended to
* @src: The string to append to it
*/
char *strcat(char *dest, const char *src)
{
char *tmp = dest
while (*dest)
dest++
while ((*dest++ = *src++) != '\0')
return tmp
}
我这里有两个函数或许对你有用。
/* 该函数用于删除文件和文陵唤正件夹 */
function dirDelete($dir) {
$dir = dirPath($dir)
if (!is_dir($dir)) {
return false
}
$list = glob($dir . '尺悔*')
foreach ($list as $v) {
is_dir($v) ? dirDelete($v) : @ unlink($v)
}
return @ rmdir($dir)
}
/* 该函数用于将路径标准化 */
function dirPath($path) {
$path = str_replace('\\', '链蚂/', $path)
if (substr($path, -1) != '/')
$path = $path . '/'
return $path
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)