Suppose my ftp info is: $ftp_server = "120.14.235.255"; $ftp_user_name = "user123"; $ftp_user_pass = "pass123"; ** when i login by ftp client with this info, I see my file & folders after login (such as, myFolder1, myFolder2, myfile.php etc.) I want to create a xxx.txt file in myFolder1 dir and write something in that file same time. or, write somethig in a temp text file first and upload that file to myFolder1 dir. How can I do that? Please Help....
good tutorial for this can be found at the following link http://articles.techrepublic.com.com/5100-10878_11-6069684.html
If I understand your question you just want to create a file in one of your website's folders. There's no need to involve ftp for this. There's a really good beginners tutorial on working with files using php here: http://www.tizag.com/phpT/files.php
<?php $fp = fopen('data.txt', 'w'); fwrite($fp, '1'); fwrite($fp, '23'); fclose($fp); // the content of 'data.txt' is now 123 and not 23! ?> you need to create a .txt file on your ftp. fopen it and do what ever you need and fwrite it. follow this:http://us3.php.net/manual/en/function.fwrite.php hope it helps.