ホーム

How to get the file in PHP

environment

  • POST
  • PHP
  • pathinfo

Using pathinfo

$path = $_FILES['image_url_wp']['name'];
$ext = pathinfo($path, PATHINFO_EXTENSION);
echo "Image type is";
echo $ext ;
echo nl2br("\n");

reference

How to get the file extension in PHP? [duplicate]

-ホーム

Copyright© off , 2020 All Rights Reserved Powered by AFFINGER5.