Raised This Month: $51 Target: $400
 12% 

read first line from the file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 07-02-2022 , 04:41   read first line from the file
Reply With Quote #1

How do I return the first line
PHP Code:

public GetData(){
    new 
Handle:matchFile OpenFile(g_sFilePath"r");
    new 
String:lineBuffer[128];
    
// Reads an opened file one line at a time into specified buffer
    
ReadFileLine(matchFilelineBuffersizeof(lineBuffer));
    
// Print out contents of first line on the server
    
PrintToServer("First line in file:\n%s"lineBuffer);
    
    
CloseHandle(matchFile);
    
    return 
lineBuffer;

File:- data.ini
PHP Code:
first text line to save in a variable 
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
 



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 11:31.


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