douxianliu6756 2012-12-21 21:25
浏览 42

php ftp返回最后一个命令

I figured I would make a new question for this since it isn't the same as my last question which I am also trying to work around. (Severity: Warning Message: ftp_chmod() [function.ftp-chmod]: Permissions changed on)

I am trying to use PHP ftp_exec to rename a file; however, it is outputting the result of the last ftp command that I ran. Below is the error:

A PHP Error was encountered
Severity: Warning
Message: ftp_exec() [function.ftp-exec]: Permissions changed on /public_html/admin/tempUpload/1356124170

Filename: models/inventory_model.php
Line Number: 80

Line 80 is below:

$command = 'rename '.$currentFolder.$imgName.' '.$newFolderFile.$imgName;
ftp_exec($conn_id, $command);

And several lines above that is where I am changing the permissions on the mentioned directory. Also, the rename exec command isn't doing anything, but all the commands above it are working as expected.

ftp_chmod($conn_id, 0777, $currentDir);

Do I need to reconnect for every command? Or is there some sort of clearing that I need to do prior to running the ftp_exec command? Also, when I run the exact same ftp_exec while being connected to ftp via cmd it works fine.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 使用EMD去噪处理RML2016数据集时候的原理
    • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
    • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
    • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
    • ¥15 如何在炒股软件中,爬到我想看的日k线
    • ¥15 seatunnel 怎么配置Elasticsearch
    • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
    • ¥15 (标签-MATLAB|关键词-多址)
    • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
    • ¥500 52810做蓝牙接受端