Archive for the Category PHP
Here’s a small tutorial and example PHP code on how to maintain a single instance of one object (Singleton pattern) throughout the script. You might have a complex script with bunch of objects flying around and it’s hard to keep them all available in global context. Here’s a simple OOP solution to a single object instance in PHP5.
| Read more …
September 14th, 2011 | PHP | Tags: OOP, pattern, PHP, singleton | 0 Comments
Microsoft Excel is a very powerful application and now we’ve finally got a powerful API written in PHP5 to read/write/convert Excel files also directly from Linux (not using COM, etc). It’s far from perfect at the moment but it is working in 90% of cases. Software I’m talking about can be found here and it’s called PHP Excel.
| Read more …
June 15th, 2011 | PHP | Tags: Excel, PDF, PHP, write, XLS, XLSX | 16 Comment
Microsoft Excel is a very powerful application and now we’ve finally got a powerful API written in PHP5 to read/write/convert Excel files also directly from Linux (not using COM, etc). It’s far from perfect at the moment, but it is working in 90% of cases. Software I’m talking about can be found here and it’s called PHP Excel.
| Read more …
June 15th, 2011 | PHP | Tags: CSV, Excel, PDF, PHP, read, XLS, XLSX | 6 Comment
A simple function that will scan /proc file system and check if PID exists. If name is provided, it will also check the command name. Function returns TRUE if process was found (and name matched if specified) or FALSE if no such process ID exists.
| Read more …
June 4th, 2011 | PHP | Tags: exists, Linux, PHP, PID, proc, process | 1 Comment