File Access
I want to read some files for some dynamic pages from a folder on my server that is not set to be readable by the public; i can't just change the attributes because it is bought server space and so some folders i cannot change. I can access these folders if i login as my account so i was wondering if there were some way i could have the php script log me in so i can read from those files.
I tried:
$ftp_server = "???";
$ftp_user = "???";
$ftp_pass = "???";
// set up a connection or die
$conn_id = ftp_connect("$ftp_server",21) or die("Couldn't connect to $ftp_server");
// try to login
if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
echo "Connected as $ftp_user@$ftp_server\n";
exit();
} else {
echo "Couldn't connect as $ftp_user\n";
exit();
}
//opens file for reading down here
i thought that might solve my problem, but i just got this error:
Fatal error: Call to undefined function: ftp_connect() in /usr/data/httpd/users/mordecai/immortal/finishLogin.php on line 18
(line 18 is the line i use ftp_connect())
----------------------------
Oh happyland!
__________________
----------------------------
Aeon of Darkness MUD - Free Online Roleplaying Game
http://aeonofdarkness.com
|