sudo apt-get install apache2-prefork-dev
wget https://raw.github.com/cloudflare/CloudFlare-Tools/master/mod_cloudflare.c apxs2 -iac mod_cloudflare.c sudo service apache2 restart
sudo apt-get install apache2-prefork-dev
wget https://raw.github.com/cloudflare/CloudFlare-Tools/master/mod_cloudflare.c apxs2 -iac mod_cloudflare.c sudo service apache2 restart
sudo apt-get remove sendmail sendmail-bin postfix sudo apt-get purge postfix exim4 sendmail sendmail-bin sudo reboot
vi /etc/apache2/ports.conf
NameVirtualHost 127.0.0.1 Listen 127.0.0.1:80Use this on vhosts
<virtualhost 127.0.0.1> </virtualhost>
ServerTokens OSto
ServerTokens Prod
ServerSignature Onto
ServerSignature Off
public function up() { $this->dbforge->add_field(array( 'Price' => array( 'type' => 'DECIMAL', 'constraint' => '10,2', 'unsigned' => FALSE ) )); $this->dbforge->create_table('ads'); }
#Include conf/extra/httpd-vhosts.confit will be
Include conf/extra/httpd-vhosts.conf
Open C:\wamp\bin\apache\apache2.2.22\conf\extra\httpd-vhosts.conf to add/edit virtual hosts
NameVirtualHost *:80DocumentRoot "c:/wamp/www/" ServerName localhost ServerAlias www.localhost
if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Countries_model extends CI_Model { public function get_countries() { $query = $this->db->get('countries'); if ($query->num_rows() > 0) { return $query->result(); } else { return FALSE; } } public function get_cache() { if ( ! $countries = $this->cache->get('countries')) { $countries = $this->get_countries(); $this->cache->save('countries', $countries, 86400); } return $countries; } }controller
$this->countries_model->get_cache();
//get current controller $this->router->class; //get current method $this->router->method;