Home >Backend Development >PHP Tutorial >javascript - Qiniu obtains the suffix name before uploading the image, how to obtain it
houzhui in the picture is a custom function, used to get the image suffix name, but it is useless. When it is passed to Qiniu, the image name will not be displayed directly
It will only display the date up to $name plus a random number. Does anyone know? How to get the picture suffix
houzhui in the picture is a custom function, used to get the image suffix name, but it is useless. When it is passed to Qiniu, the image name will not be displayed directly
It will only display the date up to $name plus a random number. Does anyone know? How to get the picture suffix
houzhui('$(fname)') Is there a typo here?
That should be it.
<code>$fname = "/path/test.png"; echo houzhui("$fname"); function houzhui($file) { return pathinfo($file, PATHINFO_EXTENSION); } </code>
<code class="php">pathinfo($fname, PATHINFO_EXTENSION);</code>