hmm
Now I've tried uploading the file on several diffrent ftp-servers!
On one I got this warning:
Warning: ftp_put: PORT command successful.
The same thing happend! It created a file but it didn't send any data... the file was just 0 bytes!
Last I tried uploading on a diffrent account but on the same webhotell as I have my script on... Now it did work perfetcly!
Why?
Is there any config that do so I'm not allowed to upload on diffrent servers?
My code:
<?php
$ftp_server = "ftp.XXX.XXX";
$ftp_user_name = "XXX";
$ftp_user_pass = "XXX";
$conn_id = ftp_connect($ftp_server);
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
$katalog = "public_html/";
ftp_chdir($conn_id, $katalog);
$destination_file = "test1.txt";
$source_file = "top.php";
$upload = ftp_put($conn_id, $destination_file, $source_file, FTP_BINARY);
ftp_close($conn_id);
?>