Re: Perform maths based on a number in a text file [message #183801 is a reply to message #183755] |
Wed, 20 November 2013 11:53 |
drkirkby
Messages: 4 Registered: November 2013
Karma:
|
Junior Member |
|
|
On Monday, 18 November 2013 14:46:04 UTC, Ben Bacarisse wrote:
> drkirkby(at)gmail(dot)com writes:
>
>
>
>> I'm tyring to simplify the design of a web site which uses PHP, and
>
>> hope someone can help me. Basically I want to store a number in a
>
>> file on a web site, and display that number, or a variation of it, on
>
>> a number of web pages. Let's say the parameter is "A", and is 10
>
>> ps. Three different web pages need to display this number, but in 3
>
>> different ways.
>
>>
>
>> 1) First page shows just A
>
>> 2) Second page multiples A by 3
>
>> 3) Third page multiples A by -2
>
> <snip>
>
>> 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?
>
>
>
> There is a missing piece of information. How will these numbers be
>
> updated? If they will change because you choose to alter them, then
>
> just put them into a PHP source file that is included in each of the
>
> pages. They can be written as named constants or as an array indexed
>
> in whatever way makes the accesses clearer.
Thank you Ben.
The constants will be updated manually by me - not by any software.
Dave
|
|
|