Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
This is kind of a part II to a question a posted earlier about exec and shell_exec not working.
I'm trying to use ftp_exec to execute some simple command:Code: Select all
<?php
$conn_id = ftp_connect("$server") or die ("Cannot initiate connection to host");
ftp_login($conn_id, "$username", "$userpass") or die("Cannot login");
$command = 'cd..';
if (ftp_exec($conn_id, $command)) {
echo "$command executed successfully\n";
} else {
echo "could not execute $command\n";
}
ftp_close($conn_id);
?>Warning: ftp_exec() [function.ftp-exec]: SITE EXEC is an unknown extension in /home/urieilam/public_html/work/video/test1.1.php on line 21
could not execute cd..
Have tried other commands as well, get the same. Could this be a security issue? I don't know much about commands, shell, etc..
Any info would be really appreciated.
Thanks
Uri
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]