简体   繁体   English

fopen访问被拒绝访问php.ini

[英]fopen access denied no access to php.ini

I've a problem. 我有问题 I have a website from a friend who has created the website on his own server and now trying to set it on my hosting. 我有一个朋友的网站,该朋友在自己的服务器上创建了该网站,现在尝试在我的托管服务器上进行设置。

The problem now is that I've no permission to the php.ini file so I can't use fopen becease that is not allow on by mine hosting. 现在的问题是,我没有php.ini文件的权限,因此我无法使用我的托管不允许的fopen becease。

is there an alternative? 还有其他选择吗?

Martijn 马亭

$myfile = fopen("../".$enterurl.".php", "w") or die("Unable to open file!");

        $txt = file_get_contents("blank.php");
        fwrite($myfile, $txt);
        fclose($myfile);

The problem was that i had my file permissions not right. 问题是我的文件权限不正确。 So he had no permission to open, change or delete a file. 因此,他无权打开,更改或删除文件。 I changed my file permission to 777 or 744 我将文件权限更改为777或744

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

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