发布时间:2020-09-17
WordPress 常用函数 / sanitize_file_name,
清理文件名,并把空白替换成破折号 –
删除在一些操作系统的文件名中是非法的特色字符,并且将空格和连续的破折号转换成单个破折号,去掉文件名前后的点好,破折豪和下划线。
<?php sanitize_file_name( $name ) ?>
$name
(string) (required) 要清理的文件名
Default: None
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>
(string)
清理之后的文件名
Since: 2.1
wp-includes/formatting.php
全站搜索