more info

Media72 Hosting Articles and Tips

Archive for the 'PHP' Category

Another Ruby on Rails video already!

Tuesday, May 15th, 2007

As soon as I posted about Rails Envy's first video I noticed they have created another one poking fun at PHP this time, now thats fast!

There are two more commercials to come in the series, but for now you can enjoy the second one.

Zend Framework 0.9.3 Released

Monday, May 7th, 2007

For all those people keeping tabs on the Zend Framework version 0.9.3 has just been released.

Some of the updates included in this release:

  • Zend_Controller: Action helpers, rewritten documentation
  • Zend_Db: support for sequences, natural keys, compound keys, and metadata caching
  • Zend_Filter_Input: solution for validating arrays of valus (in incubator)
  • Zend_Pdf: greatly reduced memory consumption
  • Zend_Service: web services for Amazon, Yahoo!, and Flickr extensively tested and debugged

For a full list see the changelog. Interestingly this probably going to be the last release before a 1.0 release candidate. The most important thing to note about a 1.0 release is that all future releases of the framework will have to be backwards compatible. This will make the framework a lot more stable and I'm sure we will start to see greater take up after 1.0 is released.

The Topian - Building a web application

Wednesday, October 25th, 2006
We are currently working on a web application with Chris Garrett Media. We can't tell you what it does yet, or even what it's called. What we can tell you is how we are going to build it over at The Topian. Our plan is to post about as much of the applications planning, development, marketing, and design as we can.

Smarty Template Engine Support

Sunday, September 3rd, 2006

Due to popular demand we have added Smarty Template Engine support to our servers. Smarty is a popular template engine written in PHP which allows you to easily separate code logic from presentation.

How to use Smarty

Using Smarty on our servers is easy. Firstly you need to FTP into your account and create some folders located outside of your website root. First make a folder called "smarty" in your user folder, inside of this create the following folders:

templates
templates_c
cache
configs

Once you have created your folders you will need to change the permissions on the "templates_c" and "cache" folders to 775 so they are writable, you should be bale to do this using your FTP client. You are now ready to start using smarty, create an index.php file with the following code and upload it to your public_html folder, make sure to replace "username" with your actual username.

<?php

require('Smarty/Smarty.class.php');
$smarty = new Smarty();

$smarty->template_dir = '/home2/username/smarty/templates';
$smarty->compile_dir = '/home2/username/smarty/templates_c';
$smarty->cache_dir = '/home2/username/smarty/cache';
$smarty->config_dir = '/home2/username/smarty/configs';

$smarty->assign('name', 'Ned');
$smarty->display('index.tpl');

?>

Now open up your browser and point it to your website address, you should now see the text "Hello, Ned!". Thats it, you now have Smarty setup and are ready to go. For more information on using Smarty we suggest starting with the Smarty Crash Course article.

 

hedges