I'm trying to use PHP to create a file, but it isn't working. I am assuming this is because it doesn't have write access (it's always been the problem before). I tried to test if this was the problem by making the folder chmod 0777, but that just ended up making every script in that directory return a 500 error message until I changed it back. How do I give PHP write access to my file system so it can a create a file?
Edit: Bu Hostgator üzerinde barındırılan Apache kullanarak barındırma paylaştı.
Edit 2: Someone asked for the code: The code is a GD image script. I know the rest of it works as previously I was creating the image every ime it was called. Now I am trying to create them when new text is added and save them to a folder. The write line I have is: imagejpeg(null,$file,85);
I also created a test file to check if it was just a broken script (mainly copied from tizag): http://gearboxshow.info/rkr/lesig.jpg/testfile.txt (I don't know if/how to post the code here properly. Here is the contents of the PHP script, minus PHP tags.)
Bu 13,13,1 (ayrı hatlar) döndürür, bu yüzden bir şey yazdı düşünüyor gibi görünüyor, ama testfile.txt (bunu silerseniz) (boş bir tane yükledi) boş, ya da varolmayan.
3 Düzenleme: Sunucu CentOS çalışır.