Re: System wide variable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Darren Whitlen wrote:
> Hi,
> I have a PHP script that reads and updates either a small file or a
> mysql database. This script is called from several places every .5 seconds.

assuming your using a real OS ....

whilst your figuring out an even better way to do it you might consider sticking
the small file in question in /dev/shm (again assuming that your OS has tmpfs)
so that your file is actually stored in RAM rather than on disk.

a cron job every so often can ensure you have a reasonably up2date copy of the
file lying around in case you need it.

> 
> I would like to move this file to a variable for extra speed as the file
>  is causing a few problems being accessed so many times.
> Is it possible to have a writeable variable that has the scope of EVERY
> script that is run through the parser?
> 
> Thanks,
> Darren
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux