ftp_chdir() showing warnings
ftp functions are not working however ftp option in php.ini is enabled at my server. its showing error like:
Warning: ftp_chdir() [function.ftp-chdir]: Can't change directory to
/home/dont/public_html: No such file or directory in
/home/dont/public_html/upload/开发者_开发百科engine.php on line 327
Sounds like you're just using the FTP functions incorrectly, but we'd need a code example to be sure. Such as what's around line 327 on engine.php...
As DOOManiac says, there's not much we can do without seeing the rest of your code.
The most likely problem here is that your FTP root dir isn't your server's root dir. You may need to change directory to /public_html
instead of /home/dont/public_html
I found this is a result that when you setup your cpanel ftp account it usually defaults to a chrooted directory like this
adding ftp username JACKBARLEY default directory is /home/myhostdomainname.com/JACKBARLEY
now when you login what will happen is you are going to be in the directory /home/myhostdomainname.com/JACKBARLEY and you will not be able to go up a directory.
What you really need to do is to change your ftp account to /home/myhostdomainname.com location which will provide access to the directory your trying to change to.
An easy way to test this is setup the ftp test account then use a program to login and verify that your chrooted in and cannot see your other directories.
Hope that helps.
精彩评论