In PHP, after assigning a file pointer resource to a variable with fopen(), how can I get the file name from the variable?

前端 未结 3 461
自闭症患者
自闭症患者 2021-01-21 01:42

For example:

$file = fopen(\"File.txt\", \"r\");
$filename = $file->basename;

if there was a method like basename for file objects (file poi

3条回答
提交回复
热议问题