rvdavid has submitted 5 links
Execute Linux commands in PHP by using backticks
in PHP added by rvdavid, on 18/3/2008 back ticks command line linux php
You can execute linux commands within a php script - all you have to do is put the command line in backticks (`). Recently, I had to upload an archive to a server which did not allow ssh. For files that I need to transfer, I just package them up in a neat archive and transfer the archive file via scp. Not having ssh access however, I uploaded the archive file via ftp and created a script which extracts the file the file looks like the following:
comment save reportStay away from Bloated Class Methods, actually, bloated ANYTHING!
in PHP added by rvdavid, on 22/3/2008 classes methods oop php5 principles tips
Why are there so many examples of bloated PHP methods out there?! I see a lot of bloated methods being used in examples through sites like phpclasses.org and a very large chunk of a project I’ve recently picked up which a few developers have worked on. Guys! remember! There is no good reason to bloat your methods to over 10-20 lines long and on the rare occasions that you do exceed 10 - 20 lines it would be more the exception to the rule as opposed to being the rule itself!
comment save reportPHP HTTPRequest Class
in PHP added by rvdavid, on 11/1/2008 advanced tutorials oo programming php5 request handling
By default, request data in PHP is handled by using Super Globals ($_POST, $_GET, $_COOKIES). Globals are bad for several reasons (outside the scope of this example google here). In an effort to remedy this, we need a way to encapsulate the request data into an object. By doing this, we are centralising access to request data through the one channel - the HTTP Request object.
comment save reportUsing Stored Procedures & MySQLI in PHP 5
in PHP added by rvdavid, on 11/12/2007 beginner tutorials database mysql oo programming php5
For the occasions that you want to use a stored procedure you've written in MySQL 5 through PHP , the semantic tool to use is PHP's built in mysqli objects/package.
comment save reportTemplate View and View Helper Design Patterns in PHP
in PHP added by rvdavid, on 6/12/2007 advanced tutorials oo programming php5
The Template View and View Helper patterns lend themselves nicely when it comes to developing a View Layer solution for PHP, or so I found out with the recent refactoring of Cubix (dubbed Cubix II). This View layer duo is very much a great candidate for a 'tag team'. Each component performs a role and together make up a big part of the View Layer.
comment save report