后端开发|php教程
怎样显示文件扩展名
后端开发-php教程
复制代码 代码如下:
微信超链接系统php源码,ubuntu磁盘分配多大,爬虫定时运行,php多人协同,ins seo优化lzw
<?php
$file = “/home/lvyaozu/backup_0115.txt”;
for($i=1; $i < 6; $i++) {
$func = ‘get_file_ext_’ . $i;
var_dump($func($file));
}
function get_file_ext_1($file) {
return strtolower(trim(substr(strrchr($file, ‘.’), 1)));
}
function get_file_ext_2($file) {
return strtolower(trim(pathinfo($file, PATHINFO_EXTENSION)));
}
function get_file_ext_3($file) {
return strtolower(trim(substr($file, strrpos($file, ‘.’)+1)));
}
function get_file_ext_4($file) {
return strtolower(trim(array_pop(explode(‘.’, $file))));
}
function get_file_ext_5($file) {
$tok = strtok($file, ‘.’);
while($tok !== false) {
$return = $tok;
$tok = strtok(‘.’);
}
return strtolower(trim($return));
}
?>
本文来自CSDN博客,转载请标明出处:/lvyaozu/archive//06/03/4237628.aspx
福娃源码 下载,ubuntu指定固定ip,tomcat怎么没有过滤,经典python爬虫代码,php 公众号文章编辑源码下载,广东推广seolzw
以上就介绍了怎样显示文件扩展名 PHP 文件扩展名 获取函数,包括了怎样显示文件扩展名方面的内容,希望对PHP教学有兴趣的朋友有所帮助。
geeegle源码,苹果笔记本下载vscode,ubuntu开启rdp,tomcat默认最大并发,键盘精灵 爬虫,php主流版本,福清网页seo费用是多少lzw