eMonk Posted October 28, 2008 Share Posted October 28, 2008 i'm getting the error in the topic with this code. i don't think i'm pointing to the correct path using $DOCUMENT_ROOT. $DOCUMENT_ROOT = $SERVER['DOCUMENT ROOT']; // open file for appending @ $fp = fopen("$DOCUMENT_ROOT/www.domain.com/orders/orders.txt", 'ab'); flock($fp, LOCK_EX); if (!$fp) { echo "<p><strong>Your order could not be processed at this time. Please try again later.</strong></p></body></html>"; exit; } - the .php file is uploaded in /www.domain.com/test/processorder.php - the orders.txt is uploaded in /www.domain.com/orders/orders.txt how do i know 100% if i'm pointing to the right file in fopen? Link to comment https://forums.phpfreaks.com/topic/130388-solved-warning-flock-expects-parameter-1-to-be-resource/ Share on other sites More sharing options...
eMonk Posted October 28, 2008 Author Share Posted October 28, 2008 posted in wrong section, please delete this post. Link to comment https://forums.phpfreaks.com/topic/130388-solved-warning-flock-expects-parameter-1-to-be-resource/#findComment-676352 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.