HTML Help Forum Index HTML Help
Please Search for the answer to your question before asking it! Thanks.
 

PHP FGet() function
Post a Reply to this Topic Ask a New Question
Click here to go to the original topic
       HTML Help Forum Index -> PHP
View previous topic :: View next topic  
Author Message
jmpalmer



Joined: 16 Sep 2008
Posts: 1

Posted: Tue Sep 16, 2008 3:30 pm     PHP FGet() function  

All:

I have the following simple FTP/PHP code that doesn't give any errors but the target file doesn't transfer.

I transfer the file from "command line params" and through FlashFXP ( a GUI ftp program) without a problem.

*The code*

<?php
$source = "source.txt";
$target = fopen("target.txt", "w");

$conn = ftp_connect("xxx.xxx.xxx.xxx") or die("Could not connect");
ftp_login($conn,"platypi","password");
ftp_fget($conn,$target,$source,FTP_ASCII);
fclose($target);
ftp_close($conn);
?>

Why won't this simple text FTP file transfer work?

Tanks for the help.

John
 
 
HOSTING / DESIGN
MAKE MONEY

       HTML Help Forum Index -> PHP
Page 1 of 1


Powered by phpBB Search Engine Indexer
Powered by phpBB 2.0.19 © 2001, 2002 phpBB Group