Ok, I figured I'd tackle this since I've been coding php for about 6
months now. And wouldn't ya know, I'm having problems with, what I
thought would be the easiest thing to code ever.  Yeah well I get the
file to upload, and heck I can even take the file and display what text
was uploaded.

 

However when I go and try tio view the file in that directory. It says:

 

 Forbidden

 

            You don't have permission to access /directory uploaded
to/renamed file.txt on this server.

 

Well if I don't have permission to view it, how is PHP able to read the
file after it's been uploaded and moved to display the $contents of the
file just uploaded?

 

I've tried changing the directory that it uploads to, same thing, I
changed the tmp_upload_directory in the php.ini file, it was N/A so I
added this to the php.ini file, but that doesn't work either.  It will
upload the file just fine, and If I FTP into the server, I can see the
file and I can retrieve the file just fine. I just don't get why I
personally don't have access from the same browser to view the file in
the browser.  Very confusing.  If I put something else in that directory
by FTP and go to the browser, I can see it just fine, it's only doing
this on the files that PHP uploads.

 

I can add code to help if necessary but I'm not encrypting the file on
upload or anything, I actually took the code out of one of the 6 books
on PHP that I have bought, it's PHP and MySQL Web Development 2nd
Edition.  By Luke Welling and Laura Thomson.  That's even more boggling.
The code starts on page 340 for anyone that has the book.  Any help on
this would be appreciated.  You know it's sad when I can create a super
cool database schema but I can't upload a stupid file without locking
myself out of the file from the browser.  Nice huh!!  :-)

 

Thanks In Advanced

Wolf

 

Reply via email to