php獲取檔案字尾的9種方法

2022-10-06 09:36:10 字數 843 閱讀 2998

<?php /**

* created by phpstorm.

* user: liuft

* date: 2016/3/7

* time: 15:46

*/ //第一種

// function get_extension($file)

// //第二種

// function get_extension($file)

//

//第三種

// functqdogfzeion get_extension($程式設計客棧file)

//

//第四種

//function get_extension($file)//

//第五種

//function get_extension($file)//

//第六種

// function get_extension(www.cppcns.com$file)//

//第七種

// function get_extension($file)

// //

//第八種

// function get_extension($file)

//

//第九種

// function get_extension($file)

//暫時想這麼多,以後想起來再補充

$file = "";

$data = get_extension($file);www.cppcns.com

var_export($data);

本文標題: php獲取檔案字尾的9種方法

本文位址:

php獲取檔案字尾的9種方法

獲取檔案字尾的9種方法12 3456 78910 1112 1314 1516 1718 1920 2122 2324 2526 2728 2930 3132 3334 3536 3738 3940 4142 4344 4546 4748 4950 5152 5354 5556 5758 5960 ...

PHP獲取檔案字尾名的三種方法

php獲取檔案字尾名的三種方法。如下 function get file type filename php獲取檔案字尾名的幾種方法2 function get file type filename php獲取檔案字尾名的幾種方法3 function get file type filename 回...

獲取檔案字尾名7種方法

file test.php 字串轉換成陣列 arr explode file echo arr count arr 1 最後一次出現位置 echo substr file,strrpos file,1 最後一次出現的位置 echo substr strrchr file,1 將字串倒敘切割為陣列 再...