open file in linux box |
[eluser]BrianDHall[/eluser]
OK, first of all you'll need to figure out exactly which call is creating the problem - 0755 will only permit writing by Owner, so if your server/php isn't the owner of the file it won't be able to open the file for writing. Does the file exist according to file_exists()? If not, something is wrong with $location. If it does exist, what fopen call precisely is causing the error? I notice you have or die() on one of them but your die isn't being called, so I presume it is one of the other ones. For debugging as a quick check, make the directory and file permission 0777. There is nothing wrong with doing things with fopen or the like, but as an entirely different suggestion you might take a look at the file helper provided by CI. That doesn't mean you can't use fopen, I just personally have found the file helper easier to use for common tasks. |
Messages In This Thread |
open file in linux box - by El Forum - 09-16-2009, 09:21 AM
open file in linux box - by El Forum - 09-16-2009, 11:44 AM
open file in linux box - by El Forum - 09-16-2009, 12:17 PM
open file in linux box - by El Forum - 09-16-2009, 04:46 PM
open file in linux box - by El Forum - 09-16-2009, 05:01 PM
open file in linux box - by El Forum - 09-16-2009, 06:22 PM
|