Hi,
when i was doing testing on my own workstation (own webserver and FTP server), everything is working fine. But when I upload the scripts to the live server and I test it, it is not working fine.
The problem is regarding FTP. I would like to use FTP to upload files to the remote server. So when I was coding and testing on my own workstation, everything seems fine because all the files are LOCAL. So on the live server, when I try to upload a text file, it did not work and I guess most probably is because the server think that the file is in it's harddisk.
upload.php
<form method="post" action="submitupload.php">
<input type="text" name="doc">
<input type="submit" name="submit" value="submit">
</form>
submitupload.php
$clientfile = $_POST["doc"]; // let say it is C:/test.txt
$conn_id = ftp_connect("192.168.42.111");
$login_result = ftp_login($conn_id, "myname", "mypwd");
if (!$conn_id or !$login_result) {
print "Wrong Password or FTP Server not Up";
exit;
}
ftp_put($conn_id, "./webapp/test.txt",$clientfile , FTP_BINARY) or die ("err"); // it stopped here
But when I change the $clientfile to some file that exist in the server C: drive, it worked.
Please tell me how do I solve this?