博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
获取函数输入字符串函数_PHP函数从字符串获取文件扩展名
阅读量:2514 次
发布时间:2019-05-11

本文共 484 字,大约阅读时间需要 1 分钟。

获取函数输入字符串函数

Getting the file extension from a PHP string can be very important in validating a file or file upload. I've written a simple PHP function to retrieve a file extension from a string.

从PHP字符串获取文件扩展名对于验证文件或文件上传非常重要。 我编写了一个简单PHP函数,用于从字符串中检索文件扩展名。

代码 (The Code)

function get_file_extension($file_name) {	return substr(strrchr($file_name,'.'),1);}

This simple method of file extension retrieval should be reused throughout your code.

这种简单的文件扩展名检索方法应在整个代码中重复使用。

翻译自:

获取函数输入字符串函数

转载地址:http://pvpwd.baihongyu.com/

你可能感兴趣的文章
互联网金融P2P主业务场景自动化测试
查看>>
array_filter函数的应用
查看>>
梅西确定代言 中国首秀牵手Mate 8
查看>>
html,body
查看>>
一个Brushes笔画应用ios源码完整版
查看>>
IOS 网络浅析-(七 JSON解析之三方JSONKit)
查看>>
image的srcset属性
查看>>
vs + Qt 环境下配置QCustomPlot编译不通过
查看>>
simplorer使用 simlink的 svpwm模块
查看>>
j.c.Warnsdorff马踏棋盘算法
查看>>
[C#-SQLite] SQLite一些奇怪的问题
查看>>
Map的遍历
查看>>
VC中常用文件操作(三)
查看>>
C#中WebService 的 Timer定时器过段时间后自动停止运行
查看>>
nginx 配置rewrite
查看>>
hibernate中cache二级缓存问题
查看>>
My third day of OpenCV
查看>>
Java并发计数器探秘
查看>>
特色博客
查看>>
[Python] RuntimeError: Invalid DISPLAY variable
查看>>