среда, 15 февраля 2012 г.

PHP febr.15.

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Main extends CI_Controller {
public function index()
{
echo'Sveiks :)';
}
}
--------------------------------------

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Main extends CI_Controller {
public function index()
{
$data['works'] = 'This really works!';
$this->load->view('main',$data);
}
}
----------------------------------------
<!DOCTYPE html>
<html>
<head>
<title>Mans skats</title>
</head>
<body>
Oh hi there! <?=$time?>
</body>
</html>
----------------------------------------
<!DOCTYPE html>
<html>
<head>
<title>Mans skats</title>
</head>
<body>
Oh hi there!
<?
echo $this->benchmark->memory_usage();
?>
</body>
</html>
-----------------------------------------
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Main extends CI_Controller {
public function index()
{
$skats = $this->load->view('main','',true);
}
}
------------------------------------------
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
public function index()
{
$this->load->library('calendar');
echo $this->calendar->generate();
}
}
-------------------------------------------
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
public function index()
{
$this->load->library('calendar');
echo $this->calendar->generate(2006, 6);
}
}
-------------------------------------------
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
public function index()
{
$this->load->library('calendar');

$data = array(
               3  => 'http://example.com/news/article/2006/03/',
               7  => 'http://example.com/news/article/2006/07/',
               13 => 'http://example.com/news/article/2006/13/',
               26 => 'http://example.com/news/article/2006/26/'
             );

echo $this->calendar->generate(2006, 6, $data);
}
}
---------------------------------------------
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
public function index()
{
$prefs = array (
               'start_day'    => 'saturday',
               'month_type'   => 'long',
               'day_type'     => 'short'
             );

$this->load->library('calendar', $prefs);

$data = array(
               3  => 'http://example.com/news/article/2006/03/',
               7  => 'http://example.com/news/article/2006/07/',
               13 => 'http://example.com/news/article/2006/13/',
               26 => 'http://example.com/news/article/2006/26/'
             );

echo $this->calendar->generate(2006, 6, $data);
}
}
-----------------------------------------------------
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
public function index()
{
$prefs = array (
               'show_next_prev'  => TRUE,
               'next_prev_url'   => 'http://example.com/index.php/calendar/show/'
             );

$this->load->library('calendar', $prefs);

$data = array(
               3  => 'http://example.com/news/article/2006/03/',
               7  => 'http://example.com/news/article/2006/07/',
               13 => 'http://example.com/news/article/2006/13/',
               26 => 'http://example.com/news/article/2006/26/'
             );

echo $this->calendar->generate(2006, 6, $data);
}
}
-----------------------------------------------------













Комментариев нет:

Отправить комментарий