chennaibala Posted November 10, 2009 Share Posted November 10, 2009 hi frds.. <input id="file1" type="file" name="file[]" > upload image show path like C:\Documents and Settings\My Documents\My Pictures\images0056.jpg i need image name with extension like images0056.jpg..thanks in advance.... Link to comment https://forums.phpfreaks.com/topic/180970-upload-image-name-with-extension-using-php/ Share on other sites More sharing options...
Garethp Posted November 10, 2009 Share Posted November 10, 2009 $Name = basename($_FILES['file']); Link to comment https://forums.phpfreaks.com/topic/180970-upload-image-name-with-extension-using-php/#findComment-954833 Share on other sites More sharing options...
otuatail Posted November 10, 2009 Share Posted November 10, 2009 $Name = $_FILES["file"]["name"]; // full name with extension. Desond. Link to comment https://forums.phpfreaks.com/topic/180970-upload-image-name-with-extension-using-php/#findComment-954872 Share on other sites More sharing options...
chennaibala Posted November 11, 2009 Author Share Posted November 11, 2009 thanksss,but i using same name for all input type="file".so problem in getting name.. <input id="file1" type="file" name="file[]" > <input id="file2" type="file" name="file[]" > <input id="file3" type="file" name="file[]" > Link to comment https://forums.phpfreaks.com/topic/180970-upload-image-name-with-extension-using-php/#findComment-955407 Share on other sites More sharing options...
PFMaBiSmAd Posted November 11, 2009 Share Posted November 11, 2009 See Example #3 in the documentation - http://us3.php.net/manual/en/features.file-upload.post-method.php Link to comment https://forums.phpfreaks.com/topic/180970-upload-image-name-with-extension-using-php/#findComment-955465 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.