file_put_contents - failed to open stream: Permission denied

前端 未结 14 1694
耶瑟儿~
耶瑟儿~ 2020-11-27 03:05

I am trying to write a query to a file for debugging. The file is in database/execute.php. The file I want to write to is database/queries.php.

14条回答
  •  误落风尘
    2020-11-27 03:44

    Realise this is pretty old now, but there's no need to manually write queries to a file like this. MySQL has logging support built in, you just need to enable it within your dev environment.

    Take a look at the documentation for the 'general query log':

    http://dev.mysql.com/doc/refman/5.1/en/query-log.html

提交回复
热议问题