Tag: PHP
All the articles with the tag "PHP".
-
PHPExcel 1.0.0 final
I'm quite proud to announce the 1.0.0 version of PHPExcel, a set of classes that allows you to wirte Excel2007 files from PHP. Since my last post on this, a lot of things happened, feature-wise and project-wise. Feature-wise, conditional formatting was added, and a first attempt to a Excel2007 file reader has been created. Project-wise, Jakub Vrana signed up as a developer. He's currently working on an improved version of the Excel2007 Reader. We are still looking for extra developers: if you know PHP 5, object-oriented programming, have knowledge of/interest in OpenXML or the Open Document Format (as we plan to include that too), please apply.
-
PHP Excel classes on CodePlex
Just for the record: my PHP Excel classes have been released on CodePlex under a GPL license, and will be further released over there. The full URL: www.codeplex.com/PHPExcel.
-
MyGeneration template for Zend_Db_Table
In my article on NHibernate, I mentioned MyGeneration, a tool which creates database classes / ORM classes from your database tables. Since MyGeneration uses templates to generate classes, and PHP is underrepresented, I decided to create a PHP Zend_Db_Table template, which creates the necessary Zend_Db_Table overloads for every table in your application built using the Zend Framework. Downloads and updates can be found on the MyGeneration template library: http://www.mygenerationsoftware.com/TemplateLibrary/Template/?id=be41c1ec-07e2-489c-ab6e-13f42f07adda
-
PHP for Microsoft AJAX Library
Something really interesting has just been released on CodePlex: PHP for Microsoft AJAX Library. The code you have to use in your scripts is clean and easy, providing a full-featured PHP backend to the Microsoft AJAX Library. The Microsoft AJAX Library is a pure-JavaScript library that's used by ASP.NET AJAX but is also available as a separate download. Because it's pure JavaScript, it's not tied to ASP.NET on the backend. PHP for MS AJAX is code to help you make use of the Microsoft AJAX Library from PHP applications. This PHP script simply exposes PHP classes as AJAX-enabled web services, just like ASP.NET applications would do.
-
PHP code performance tweaks
Thanks to Sam Cooper's testing, some scalability issues came up in my SpreadSheet classes. Seems PHP has some odd internal quirks, which cause performance loss that can be severe on large amounts of data. These strange things are probably caused by PHP because it uses multiple C functions in order to perform something a single C function can handle. Here's an example I discovered in my own code: When you have a large array, say $aNames, in_array('Maarten', $aNames) is really slow."Flipping" the array, making keys values, and values keys, and then using isset() seems to be roughly 3 times faster!So, when you need to check if an element is contained by an array, use the following code:$aFlipped = array_flip($aNames);if (isset($aFlipped['Maarten'])) { ... }
-
Excel2007 in PHP - Project status
After a month of development, I think it's time for a status update on my PHP Excel2007 classes. 16 december 2007, I started working on these classes as a test to check how hard it could be to create Excel2007 files using PHP5. The story about Excel2007 and PHP, got picked up by a few websites, and it seems my set of classes has been downloaded quite a number of times. This made me continue developing the basic "Hello World" example, to a set of classes which can produce Excel files like this one: Turns out my test-case is growing into something bigger. I'll keep adding some features, and keep you informed. The latest version can be found on CodePlex.
-
Office 2007 SpreadsheetML classes in PHP
In my evening hours, I've been working on a set of PHP classes to create Offixe 2007 SpreasheetML documents (.xlsx files). I finished my first goals (some basic XLSX writing), and I want to share this set of classes to the community. Currently, the following features are supported: Each cell supports the following data formats: string, number, formula, boolean. Visual formatting is not implemented, but I'll get to that later. An example of what can be achieved, can be found in this example XLSX file. A download of my class set can be found here. Class documentation is included.Please note that I am releasing this under GPL license.
-
Zend Framework custom route
Today, I was once again testing the Zed Framework. One of the things I was trying to do, is creating URL's in different languages. What I did was creating a controller 'user', with the action 'edit' (i.e. www.example.com/user/edit). Now, I want this to be available in Dutch too (i.e. www.example.com/gebruiker/bewerken). The trick is to add custom routes, which map back to the real controller and action. In my case, adding the following in my index.php did the job: Only bad thing is that you should add this for all your actions, otherwise not all routes succeed.Another important note is that routes are matched in reverse order. Make sure your most generic routes are defined first, and more specific routes last.
-
Microsoft and Zend collaborate on PHP for Windows
A nice press release today at Microsoft: Microsoft and Zend Technologies Announce Technical Collaboration to Improve Interoperability of PHP on the Windows Server Platform. Both companies admit that PHP is often developed on Windows systems, but the final server environment is mostly *nix. With this collaboration, Microsoft and Zend will try to change that. The specific points of action in this collaboration: I think this is nice news! Looking forward to results of this collaboration...
-
Munin PHP based mod_security
Today, I discovered a nice PHP thing: Munin. This is a PHP version of Apache mod_security, allowing it to be run on IIS too. Munin performs rule based checks on HTTP headers, get and post data, ... The standard rule set disallows some things like path traversal and possible fopen() attacks. In addition to these rulesets, one should add some more for filtering out SQL injection attacks, cross-site script loading, ... These things should already be covered in your code, but an extra filter at the front door is always nice. You also get a nice control panel in which you can check rules that have matched and thus might indicate possible misuse of your website. You can also manage rules in this front-end.