سؤال

I have one website, not i want when i upload this site on live server it should ask for database username, password, site url..etc. Something like website installer. It is working fine in LOCAL system.

Now my problem is: i need to change RewriteBase in .htaccess file. But this file is located at root of site. So i am getting permission issue to create new file or edit/copy file which is located at root.

Warning: rename(generate.htaccess,.htaccess): Permission denied

Warning: copy(.htaccess): failed to open stream: Permission denied

What should i do. Please help.

Thanks.

هل كانت مفيدة؟

المحلول

To Create/Modify file on root directory you must have to give 0777 permission to your root directory. This is not a good practice.

I suggest create empty .htaccess or other required file with 777 permission initially. Before writing content in that file first check write permission after that copy content from source file (in your case from where you trying to copy).

Hope this may help.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top