Hack

Install your favorite Open Source in 10min with BitNami

July 21, 08 by ReniX
advertisment

Thanks for visiting! If you're new here, you may want to subscribe to my Rss Feed. This blog posts regular Internet news, updates for apps, security, ideas, hacks, quick fixes and everything about hi-tech. Go ahead, subscribe to our feed!

banner-start-bitnami-stacks-wordpress-install-opensource

BitNami stacks make it incredibly easy to install your favorite open source software. Application stacks include an open source application and all the dependencies necessary to run it, such as Apache, MySQL and PHP or Ruby. All you need to do is download the Stack, provide a few pieces of information when prompted by the installation wizard, and that’s it.

Read the rest of this entry »

10 Tips That Every PHP Newbie Should Know

September 18, 07 by ReniX
advertisment

php

I wish I had known these 10 tips the day I started working with PHP. Instead of learning them through painstaking process, I could have been on my way to becoming a PHP programmer even sooner! This article is presented in two parts and is intended for folks who are new to PHP.

Tip 1: MySQL Connection Class

The majority of web applications I’ve worked with over the past year have used some variation of this connection class:
[sourcecode language='sql']
class DB {
function DB() {
$this->host = “localhost”; // your host
$this->db = “myDatabase”; // your database
$this->user = “root”; // your username
$this->pass = “mysql”; // your password

$this->link = mysql_connect($this->host, $this->user,
$this->pass);
mysql_select_db($this->db);
}
}

// calls it to action
$db = new $DB;[/sourcecode]

Simply edit the variables and include this in your files. This doesn’t require any knowledge or special understanding to use. Once you’ve added it to your repertoire, you won’t likely need to create a new connection class any time soon. Now you can get to work and quickly connect to your database without a lot of extra markup:
[sourcecode language='sql']
$result = mysql_query(”SELECT * FROM table ORDER BY id ASC LIMIT 0,10″);[/sourcecode]
Read the rest of this entry »

Close
E-mail It