I keep getting Fatal error: Call to undefined function Ftp() in C:\wamp\www\Work\ftp_test.php on line 4 when i run the following script.
<?php
include 'includes/Ftp.php';
Ftp('ftp.server.com','username','password',$port='21',$connect=true,$check_remotely_for_items=true,$output_actions=false);
?>
I know it means that it can’t find the included file, but I am not sure why…
The file Ftp.php is in a folder marked ‘includes’ inside the same folder as ftp_test.php. Anyone have any ideas as to why this is occurring?
From what i can see the original code is fine but the function your calling doesn’t exist, make sure the function name matches as they are case sensitive i believe
Warning: include(dirname(FILE)./includes/Ftp.php) [function.include]: failed to open stream: No such file or directory in C:\wamp\www\Work\ftp_test.php on line 2
Warning: include() [function.include]: Failed opening ‘dirname(FILE)./includes/Ftp.php’ for inclusion (include_path=‘.;C:\php5\pear’) in C:\wamp\www\Work\ftp_test.php on line 2
Ftp.php is the correct file name. I even copied it directly from the file to make sure.
Here is the include path from the php.ini file
include_path = “.;c:\php\includes”
If that doesn’t work I’m sure the file doesn’t exist.
Btw, is it really Ftp.php? Or is is ftp.php, or something else? - case matters (well, on *nix boxes anyway)