|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-12-27 09:48 UTC] alexander at alexautonet dot nl
[2005-12-27 10:33 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 20:00:01 2025 UTC |
Description: ------------ The file_put_contents()-function writes to SERVER_ROOT; not to the same path the script is running in. I'll use this for debug-mode (to write SQL-query-logs and other variables to txtfiles).' I'm using PHP 5.1.1 as loaded module in Apache 2.0.55 on Win32. Reproduce code: --------------- <?php class test { function __destruct() { // Writes to SERVER_ROOT (!!) file_put_contents("testing.txt","Blabla"); } } $x = new test(); ?> Expected result: ---------------- testing.txt has to be written in the executed path. Actual result: -------------- testing.txt is written in SERVER_ROOT of Apache2.