H I O X INDIA
FREE PHP Topics
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

PHP Topics
Introduction
Common Header
Random Number
Type
Form Variables
Date and Time
File Handling
Error Handling
DB Size
PHP Mail
String Tokens
Running PHP from JS
Array To JS
Array to PHP
Encryption
Ask Your Doubts
Feedback





File Permission and Usage


Topic

I am getting "failed to open stream: Permission denied in....line 32" why?
How can I stop "failed to open stream" exception?



Explanation

Each file will have its own properties.
It can be a 'read only' file or a file that cannot even be read.
The permission for each file can be modified. There are basically three levels "read/write/execute".
If we are doing a write operation in a file, proper write permission should be given to that file.

Example:
In the below example we show the permission denied issue. Here we try to write in to a file called "test5.txt", which does not have write permission.

<?php
$file1 = "./test5.txt";
$open = fopen($file1, "w");
fwrite($open,"test"); ?>

As a result we get the permission denied exception.


How to set Permission / stop permission denied:
The permission can be set using the filemanager / ftp tools.
Upload the file. Go to filemanager/ ftp tool, select the file and change the permission to required value.



others


privacypolicy     licence     sitemap
(c) copyright, 2004 hioxindia.com