Here is the source code:
$(document).ready(function(){
$.post("scan.php?dir=<?=$_POST['dir']?>", function(data){
alert(data);
});
});
The generated code is:
$(document).ready(function(){
$.post("scan.php?dir=C:\xampp\htdocs\windowsMedias\music", function(data){
alert(data);
});
});
But it won’t work (google chrome returns the error in the title).
If I add the generated code manually, without PHP, it works.
Someone knows how to fix it?
You need to urlencode your parameter.