get File Extention name in php and javascript
// php
$ext = substr(strrchr($fileName, '.'), 1);
// javascript
var file = $('#txtfile').val();
ext = file.substr(file.lastIndexOf('.')+1);
alert(ext);
$ext = substr(strrchr($fileName, '.'), 1);
// javascript
var file = $('#txtfile').val();
ext = file.substr(file.lastIndexOf('.')+1);
alert(ext);
Comments
Post a Comment
If you Satisfied , Please Leave a comment