Hi guys i have an embedded game in an html (unity3D) and i am wanting to delete a file from my server.
so at the moment i have a php file on my server and the html containing the javascript on my desktop.
test.php
I will out the correct domian name and username and password and this should delete a file named test.txt on my server.
the problem i am having is calling this script from my javascript which is my main html:
i have searched all over and found if i do this :
But this is not working, can anyone help?
so at the moment i have a php file on my server and the html containing the javascript on my desktop.
test.php
PHP Code:
<?php
$conn = ftp_connect("ftp.domain.co.uk") or die("Could not connect");
ftp_login($conn,"username","password");
echo ftp_delete($conn,"test.txt");
ftp_close($conn);
?>
the problem i am having is calling this script from my javascript which is my main html:
i have searched all over and found if i do this :
Code:
<script language="JavaScript"> function DELETE_SERVER_FILE() { dummyimage = new Image(); dummyimage.src ="http://www.domain.co.uk/test.php" } </script>
Comment