💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
# file\_pre() ## file\_pre() ``` <pre class="calibre11">``` file_pre($filename, $max = 32) ``` ``` #### 【功能】 获取文件名的前面一部分,不包含 .,可以设置最大长度。 #### 【参数】 ``` <pre class="calibre11">``` $filename:文件名 $max:最大长度(为了安全) ``` ``` #### 【用例】 ``` <pre class="calibre11">``` <?php include './xiunophp/xiunophp.php'; echo file_pre("abc.jpg.php"); // 结果:abc.jpg ?> ``` ```