vendredi 27 avril 2018

How to Set download Path in PHP

I'm downloading html file with the content of a div. It's working perfectly but only issue is that it's downloading file in downloads folder instead i want it to download in the folder where project exists.

Here is the code of download function:

function download(){
    var a = document.body.appendChild(
        document.createElement("a")
    );
    a.download = "design.html";
    a.href = "data:text/html," + document.getElementById("editor").innerHTML; 
    a.click(); 
}




Aucun commentaire:

Enregistrer un commentaire