繁体   English   中英

chmod()[function.chmod]:权限被拒绝

[英]chmod() [function.chmod]: Permission denied

我的项目需要协助。 我创建了chmod <?php chmod("../database.php",0777); ?> <?php chmod("../database.php",0777); ?>位于安装文件夹中,则dabase.php位于根目录中。 我在用哥达迪。 我尝试使用Filezilla并输入777或755来设置权限,但是从ftp filezilla中得到了一些错误:

Command:    CWD /
Response:   250 CWD command successful.
Command:    SITE CHMOD 777 install
Response:   500 'SITE CHMOD 777 install': command not understood
Status: Retrieving directory listing of "/"...
Status: Directory listing of "/" successful
Status: Set permissions of '/install/1.php' to '777'
Command:    CWD /install
Response:   250 CWD command successful.
Command:    SITE CHMOD 777 1.php
Response:   500 'SITE CHMOD 777 1.php': command not understood

而且,Godaddy文件管理器中没有用于页面隐私设置的选项来设置权限。 并且我还为chmod所在的文件夹设置了权限。

这是数据库文件中的代码:

    <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$db['default']['username'] = "usernamedb";
$db['default']['password'] = "mypassword";
$db['default']['database'] = "mydb";

$db['default']['hostname'] = "localhost";
$db['default']['dbdriver'] = "mysql";
$db['default']['dbprefix'] = "";
$db['default']['pconnect'] = TRUE;
$db['default']['db_debug'] = FALSE;
$db['default']['cache_on'] = FALSE;
$db['default']['cachedir'] = "";
$db['default']['char_set'] = "utf8";
$db['default']['dbcollat'] = "utf8_general_ci";
$active_group = "default";
$active_record = TRUE;

注意:代码的信息实际上并不是我的密码和用户名等,以保护我的隐私。

这是我得到的错误:

警告:chmod()[function.chmod]:第2行的D:\\ Hosting \\ 11924492 \\ html \\ install \\ 1.php中的权限被拒绝

希望任何人都能帮助我。

谢谢

Oldskool是正确的,您实际上不应该使用777。但是,问题的症结在于您试图在Windows环境中使用chmod (线索是您的PHP文件的路径: D:\\Hosting\\11924492\\html\\install\\1.php )。 chmod是一个Unix命令。

看起来GoDaddy确实为您提供了一种通过其控制台在Windows计算机上编辑文件权限的方法: https : //www.godaddy.com/help/set-directory-permissions-windows-6481

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM