0

How do one check with php if a file is 'genuinely' editable i.e. the file is editable in any file editor. Ex : php, text, html or even .htaccess file. All these file is editable in notepad or any text editor.

I am using php 'is_writable' function. But it is also returning image file as writable file.

Anup Surin
  • 38
  • 1
  • 10
  • You seem to be confusing "editable" with "text". I can open an image file in Photoshop and edit it quite happily, for that matter I could [do it with PHP](http://php.net/manual/en/book.image.php) too. – Quentin Jun 16 '18 at 09:48
  • Aren't **ALL** files technically editable? I could open a .png file in notepad and edit it no problem.. the result wouldn't be good, but I can still edit it. – Chris Jun 16 '18 at 09:50
  • @Chris — Not if they are marked as read only – Quentin Jun 16 '18 at 09:50
  • Sorry, let me correct it, it should be text – Anup Surin Jun 16 '18 at 09:54

0 Answers0