Page 1 of 1

terminating/closing process and relaunching program in php?

Posted: Sat Oct 16, 2004 6:55 am
by zgamer
hi,
i wan't to try to create a script that will create a dir for a user so far so good :D

now i want to open a file and add to the end of the file the right code that will still work for me :D

but my problem is the ftp is a procces so is there anyway to stop the process and then relaunching the ftp program? :roll:

Posted: Sat Oct 16, 2004 7:25 am
by m3mn0n
Anything you want to do with that FTP program, you can do with just PHP code.

see: [php_man]filesystem[/php_man] & even [php_man]ftp[/php_man]

Posted: Sat Oct 16, 2004 7:36 am
by zgamer
hmm i don't get what you mean,
what i mean im using slimftpd and i need it runs as procces how can i stop the process and then reopen the application because the application can only been running 1 time or should i need to reboot every time my php script has done addind a user?

Posted: Sat Oct 16, 2004 8:19 am
by m3mn0n
Oh it seemed as if you were asking about actually launching an ftp client application. It would help to explain yourself a bit more because not everyone--including myself--knows what slimftpd is, or how it applies to PHP code.

A Google search later...
SlimFTPd site wrote:SlimFTPd is a fully standards-compliant FTP server
It would have helped to include that somewhere in your two posts here. ;)

I recommend using [php_man]exec()[/php_man]. It will most likely be of great service to you if you create a batch (.bat) file, or if that application has executables to stop/start/restart (like Apache can). That way you can simply exec() the right executable to do the task you want.