| | |||||
| ||||||||
| CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| NamePros Regular Join Date: Sep 2005 Location: At Home
Posts: 881
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Accesing a file in an upper directory I am trying to access the .htaccess file from another folder, so for example from the admin folder i want to edit the root .htaccess file. PHP Code: I have this but it doesn't seem to work.
__________________
Last edited by asgsoft; 07-31-2006 at 04:17 AM.
|
| |
| | #2 (permalink) |
| Eating Pie Join Date: Nov 2004 Location: Canada
Posts: 2,267
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | Well your fopen only has one . if you are trying to access from like /blah/ Where your script is in /blah/blahs2/ Or are you trying to access where your script is /blah/ And your .htaccess is in /blah/blahs/ ?? - Steve
__________________ I feel old. |
| |
| | #4 (permalink) |
| Eating Pie Join Date: Nov 2004 Location: Canada
Posts: 2,267
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() | .htaccess does not generally have the proper premissions to be edited. You will need to use ftp and php in order to do it. http://php.net/ftp Good luck.. I will let you try first before giving you the code for it.. - Steve
__________________ I feel old. |
| |