Looking for help reading a .txt or .ini file and outputting the info.


Posted on 16th Feb 2014 07:03 pm by admin

I have a file called Info.ini and It has the following info:
Code: [General]
Online=0
I would like it to be in a php file as just 0 if possible. Also how would I do this from php file to php file and let me explain.
Did you know?Explore Trending and Topic pages for more stories like this.


Server 1 Game Server
Server 2 Website

Both have Apache but of course I can't move the info.ini so I point the php script right to it then another php script on my server 2 would read it and do whatever it likes. My goal really is to have a simple .php stats page or maybe learn how to make it into GD in the future.

Any help would be great this what I was able to do so far:

Code: <?php
$myFile = "C:lalalalalalainfo.ini";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;


Thanks,
No comments posted yet

Your Answer:

Login to answer
172 Like 44 Dislike
Previous forums Next forums
Other forums

First root of a number
Hi,

I can't find any function in php to give me the first root of a number.
Is there any

php problem?
I don't think I'm stupid, but maybe I am.

I am working on a sit for a friend I am try to put

disable all input buttons
Hello Friends,

suppose i do have a file ( file.php ) has a submit button

Code: [Sele

Help with echo()
I'm having some problems with this code:

Code: echo '
<A HREF="jav

Stumped by Third Day of Month problem
I am trying to build an algorithm that will essentially do this:
Code: [Select]$this_month = Oct

Multiple submit forms inside a mysql array page
Hi all,

Im having trouble to get the beneath script to work the thing i can't seem to get wor

Needing Youtube thumb nail fix.
I have a script on a site that pulls in you-tube videos,
The problem is, that the thumb nails for

PHP Array quick help
I need

$_SESSION{'username'} to be like this:


if $_SESSION['username'] = "gay

Calander Basic Spript help
hi, just starting out with PHP and have the following script:

<?php
//This gets t

need help with mail()
hi i want to send an email with attaching pdf file using php. i have the following script but the pr

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash