kool_samule Posted March 9, 2010 Share Posted March 9, 2010 Hi Chaps, I have a basic PHP/FTP Application, which will be accessible to some of my company's freelance workers. // FTP Credentials $ftpServer = "www.domain.co.uk"; $ftpUser = "UserName"; $ftpPass = "Password"; set_time_limit(0); // Connect to FTP Server $conn = @ftp_connect($ftpServer) or die("Couldn't connect to FTP server"); // Login to FTP Site $login = @ftp_login($conn, $ftpUser, $ftpPass) or die("Login credentials were rejected"); This will take me to the root of 'www.domain.co.uk', but it will give everyone access to everyone else's folders, which I don't want. Freelance workers have a 'freecode' which is unique to them, so I'm looking for is to change the default 'root' directory to 'www.domain.co.uk/'FREECODE''. I've tried this already, but I get a connection to FTP error. Is there anyway of getting round this. Link to comment https://forums.phpfreaks.com/topic/194598-php-ftp-change-default-root-directory/ Share on other sites More sharing options...
Wolphie Posted March 9, 2010 Share Posted March 9, 2010 http://www.php.net/manual/en/function.ftp-chdir.php Link to comment https://forums.phpfreaks.com/topic/194598-php-ftp-change-default-root-directory/#findComment-1023463 Share on other sites More sharing options...
kool_samule Posted March 9, 2010 Author Share Posted March 9, 2010 Cheers dude, I'm sure I'll have another question soon! Link to comment https://forums.phpfreaks.com/topic/194598-php-ftp-change-default-root-directory/#findComment-1023472 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.