Jeyalakshmi Posted June 28, 2006 Share Posted June 28, 2006 <?php$f=fopen('/home/ramkumar/Desktop/a.txt','r') or exit("unable to open the file");while (!feof($f)) { $x=fgetc($f); echo $x;}fclose($f);?>this is the program i am getting unable to open the file as an output . i tried using both absolute and relative path Link to comment Share on other sites More sharing options...
aspnetguy Posted June 28, 2006 Share Posted June 28, 2006 make sure the file and folders have hte needed permissions. Link to comment Share on other sites More sharing options...
Jeyalakshmi Posted June 28, 2006 Author Share Posted June 28, 2006 make sure the file and folders have hte needed permissions.<{POST_SNAPBACK}> it has all the permissions Link to comment Share on other sites More sharing options...
Little Goat Posted June 28, 2006 Share Posted June 28, 2006 what error does it show? Link to comment Share on other sites More sharing options...
justsomeguy Posted June 28, 2006 Share Posted June 28, 2006 Make sure you have the right path. Print out the variable __FILE__ to see the current path and filename. Sometimes hosts don't let you see the actual path when they set up a virtual directory, but you can't use the virtual directory path to open a file. Link to comment Share on other sites More sharing options...
Jeyalakshmi Posted June 29, 2006 Author Share Posted June 29, 2006 Make sure you have the right path. Print out the variable __FILE__ to see the current path and filename. Sometimes hosts don't let you see the actual path when they set up a virtual directory, but you can't use the virtual directory path to open a file.<{POST_SNAPBACK}> friends i got the output. problem while saving the file Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now