November 2019

Copy files from other ftp or server to current ftp or server

Steps to copy all files of a particular folder from other ftp to current ftp – First of all make connection with Remote(other) FTP (from where we are copying the files) like –$ftp_host = ‘host’;$ftp_username = ‘ftp_username’;$ftp_password = ‘ftp_password’;$ftp_connection = ftp_connect($ftp_host); Then, login to Remote or other ftp using – $ftp_login = ftp_login($ftp_connection,$ftp_username,$ftp_password); After that …

Copy files from other ftp or server to current ftp or server Read More »

JQuery / Javascript Interview Questions

Ques: What is difference between setInterval () and setTimeout () ? Ans: setInterval(expression, time) – It will run the code or function in the time interval.Example – setInterval(function(){ alert(“Hello”); }, 1000);This will alert “Hello” after every 1 second(1000 milliseconds). setTimeout() – It will run after the time.Example – setTimeout(function(){ alert(“Hello”); }, 1000);This will alert “Hello” once only …

JQuery / Javascript Interview Questions Read More »

Read contents from input type file

Read input type file contents – File content can be read using FileReader function of javascript. Here is an example for explanation – Create HTML (input field and a div where we have to show the content of file) – <input type=”file” name=”inputfile” onchange=”readinputfile()”><div class=”showfilecontent”></div> Now call JS function – const reader = new FileReader()function …

Read contents from input type file Read More »