• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

get folder directory from input type file - PHP

javascriptphpjqueryhtml


PHP Snippet 1:

<label> Update to  : </label>
<input type="file" class="form-control" id="dirpath" name="dirpath" directory onSubmit = getPath()/>

<script language="javascript" type="text/javascript">
function getPath() {
     var inputName = document.getElementById('dirname');
     var Path;

     Path = inputName.value;
}
</script>

Related Snippets

Can't call javascript alert alertify library from PHP

Adding reCAPTCHA v2 into my PHP file

XAMPP/SQLSRV: Unable to find Sqlsrv in PHPINFO(); - errors coming from connection

How can i call a function that executes an fpdf based on the choice of a form selector?

How to get page number on dompdf PDF when using "view"

"There is no active transaction" when refreshing database in Laravel 8.0 test

Unable to match results of php hash_hmac() and coldfusion hmac()

How can i hide dt if dd got empty value

Invalid value in field "itemtype" in Google Search Console

Loading data from MySQL and populating dropdown select with jQuery Mobile, PHP

Error when uploading certain .png files "Interlace handling should be turned on when using png_read_image"

Laravel Schedule not sending email

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

How to add automatically collapse/expand in content wordpress (single.php)?

Adding reCAPTCHA v2 into my PHP file

About Contact Privacy policy Terms and conditions