Raised This Month: $ Target: $400
 0% 

File Open and File Write


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
gamer99
Senior Member
Join Date: Jul 2011
Old 01-06-2013 , 11:38   File Open and File Write
Reply With Quote #1

Hi..

I did this
PHP Code:
public rewrite_user_file()
{
    new 
sBuffer[128]
    new 
file_handle fopen(g_sUserFile"wt")
    
file_handle fopen(g_sUserFile"at")
    new 
dSize=ArraySize(g_sAdminFile)
    for(new 
i;i<dSize;i++)
    {
        
ArrayGetString(g_sAdminFile,i,sBuffer,charsmax(sBuffer))
        
formatex(sBuffercharsmax(sBuffer), "%s^n",sBuffer)
        
fputs(file_handlesBuffer)
    }
    
fclose(file_handle)

It's doing it's job perfectly but I am having one problem. When server is running, and I am trying to manually modify the file "g_sUserFile" I am getting the error
"The file is being used by another process" and it's not letting me edit the file manually. What I did wrong here? Please suggest.
__________________
Thanks and regards,
Gamer99
gamer99 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 13:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode