brown2005 Posted March 4, 2008 Share Posted March 4, 2008 $local_file = $_FILES['txt_file']['tmp_name']; $destination_file = "/".basename($_FILES['txt_file']['name']); $ftp_server = ""; $ftp_user_name = ""; $ftp_user_pass = ""; $conn_id = ftp_connect($ftp_server); $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); can i use this on any website or does it need something installed to use it.. i have tried this on site i own.. to try and get to upload to another i own. but i get Fatal error: Call to undefined function ftp_connect() in /customers/fantasy-comps.com/fantasy-comps.com/httpd.www/index.php on line 14 $conn_id = ftp_connect($ftp_server); <----------- line 14 Link to comment https://forums.phpfreaks.com/topic/94341-php-ftp-upload/ Share on other sites More sharing options...
craygo Posted March 4, 2008 Share Posted March 4, 2008 not sure if you own the server or if it a hosting site, but looks like they disabled the ftp functions. Link to comment https://forums.phpfreaks.com/topic/94341-php-ftp-upload/#findComment-483130 Share on other sites More sharing options...
brown2005 Posted March 4, 2008 Author Share Posted March 4, 2008 thanks for the help. and just checked with my hosting company and they have.. which makes me all for going it alone some more. so if i was to own my own hosting site.. just turning it on would make this work then? Link to comment https://forums.phpfreaks.com/topic/94341-php-ftp-upload/#findComment-483140 Share on other sites More sharing options...
craygo Posted March 4, 2008 Share Posted March 4, 2008 It is on by default when php is installed so no need to mess around with it. The hosting company just disabled it for their own reasons. Link to comment https://forums.phpfreaks.com/topic/94341-php-ftp-upload/#findComment-483146 Share on other sites More sharing options...
brown2005 Posted March 4, 2008 Author Share Posted March 4, 2008 ok mate. thanks for your help.. Link to comment https://forums.phpfreaks.com/topic/94341-php-ftp-upload/#findComment-483149 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.