FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Perform maths based on a number in a text file
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Perform maths based on a number in a text file [message #183748 is a reply to message #183747] Mon, 18 November 2013 10:57 Go to previous messageGo to previous message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma:
Senior Member
drkirkby(at)gmail(dot)com wrote:

> […]
> So if A was 10
>
> 1) Page 1 should show 10
> 2) Page 2 should show 30
> 3) Page 3 should show -20.
>
> If the value of A changes, I'd like to update the web site in one place,
> and not go around to every page updating them individually, as that will
> be error prone.
>
> Is there a way to put the value of A in a text file, and use the value in
> different parts of the site? If so how?

<http://php.net/file_put_contents>
<http://php.net/file_get_contents>

However, it would be easier to include a constant definition.

> Since there will actually be 15 or so parameters, A, B, C ..., is there a
> way I can put all 15 parameters in a file (perhaps one per line, or with
> white space between them), rather than have 15 different files?

Yes.

> Any thoughts?

Do your own homework.

--
When all you know is jQuery, every problem looks $(olvable).
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: array search part 2
Next Topic: What do you think about this book on API ?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 01:49:02 GMT 2024

Total time taken to generate the page: 0.06509 seconds