为什么我没有在 PHP 中编辑文件的权限?

问题描述

我的网址:

https://*.*/editor.PHP?path=public_html&file=index.PHP

editor.PHP 文件是:

<?PHP
 if ( isset ( $_POST [ 'plain' ] ) ) {
  print 'ok';
 } else {}
 $text = file_get_contents ( 'ftp://.../' . $_GET [ 'path' ] . '/' . $_GET [ 'file' ] );
?>
<form method="post"><textarea name="plain"><?PHP print $text; ?></textarea><input type="submit"></form>

如果没有提交发生,所以 $_POST 为空,那么它可以工作。如果提交发生了,那么它不起作用,错误是:

Forbidden
You don't have permission to access this resource.
Additionally,a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

有什么问题?

我尝试按如下方式更改文件的权限:

~/public_html/ftp - 0755
~/public_html/ftp/editor.PHP - 0644 change to 0777
~/public_html - 0755
~/public_html/index.PHP - 0644 change to 0777

它不起作用。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...