PHP And Its FTP Functions

liunx

Guest
Hi,
Im new to this board, but i have searched for the issue Id like to discuss. I couldnt find anything, apologies for the new thread...

I have installed php5 and apache on my dev computer to ease my coding, and I am busy writing a PHP based FTP client...

The problem I am having is quite annoying. The ftp logs in and out immediately after each "transaction" and this causes me alot of annoyance.

I have made several functions, one for each purpose, for example...

kickstart() - connects, etc, returns the connection $conn
changedir() - changes directories
removedir() - removes directories
and so on...

$conn is global, and im using it as a global in each function. problem is, teh server logs me out after each function.

if i JUST call changedir(), it will mysteriously connect, change dir, then disconnect from ftp server immediately...

kickstart() contains all the connect and login details. I onyl call it once when script runs for the first time, and then it disconnects, i dont even have an idea how it knows how to connect every time...

If possible, can someone explain why the ftp wont stay connected until i tell it to ftp_close();

thanks alot... greetings
-s-
:confused:Well, that *would* get quite annoying, wouldn't it?

I haven't messed around too much with PHP5's FTP abilities... perhaps its an easy coding error your missing? Post some code for me/us to look over, perhaps?Hi, welcome to the boards. Thing is, this particular forum is for issues dealing with the transition from PHP4 to PHP5 due to differences between the two; if your problem isn't specifically related to such a transition, then it would be better placed in the Coding forum. And like bradgrafelman said, having some code to look at would probably help.thanks guys, i managed to sort it out,
appreciate your replies...
Seems on php5 it works, and on php4 goes arb.
regards
 
Back
Top