CodeIgniter for Rapid PHP Application Development Improve your PHP coding productivity with the free compact open source MVC CodeIgniter framework 1st Edition David Upton ebook long-form edition
CodeIgniter for Rapid PHP Application Development Improve your PHP coding productivity with the free compact open source MVC CodeIgniter framework 1st Edition David Upton ebook long-form edition
[Link]
David Upton
BIRMINGHAM - MUMBAI
CodeIgniter for Rapid PHP Application Development
Improve your PHP coding productivity with the free compact
open-source MVC CodeIgniter framework!
All rights reserved. No part of this book may be reproduced, stored in a retrieval
system, or transmitted in any form or by any means, without the prior written
permission of the publisher, except in the case of brief quotations embedded in
critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of
the information presented. However, the information contained in this book is sold
without warranty, either express or implied. Neither the author, Packt Publishing,
nor its dealers or distributors will be held liable for any damages caused or alleged to
be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all the
companies and products mentioned in this book by the appropriate use of capitals.
However, Packt Publishing cannot guarantee the accuracy of this information.
ISBN 978-1-847191-74-8
[Link]
Reviewers Indexer
Rick Ellis Bhushan Pangoankar
Derek Allard
Proofreader
Development Editor Chris Smith
Douglas Peterson
Production Coordinator
Assistant Development Editor Shantanu Zagade
Nikhil Bangera
Cover Designer
Technical Editor Shantanu Zagade
Ajay S
Editorial Manager
Dipali Chittar
About the Author
I’d like to thank Rick Ellis for writing CI and for making it available,
free. This spirit of generosity with such valuable intellectual
property is what makes the Open Source movement a success, and
an example to the rest of us.
I’d also like to thank Rick, and Derek Allard, for undertaking a
technical review of the book and making many helpful suggestions.
Lastly, but not least, my thanks to Julia, John, and James for their
love, support, and patience.
Unlock a wide selection of test banks and solution guides at
[Link]
About the Reviewers
Rick Ellis is the founder and CEO of [Link], the company that develops
CodeIgniter and several other widely used web applications. Rick Ellis has a diverse
background in media technology, having worked in creative and technical capacities
on interactive projects for Disney, to feature films for Oliver Stone, and almost every
kind of web-based project in-between.
[ ii ]
Table of Contents
My 'Display' Model 78
CI's Validation Class: Checking Data Easily 79
Set Up Validation 80
Set Up the Controller 81
Set Up the Forms 81
Summary 83
Chapter 6: Simplifying Sessions and Security 85
Starting to Design a Practical Site with CI 85
Moving Around the Site 86
Security/Sessions: Using Another CI Library Class 91
Turning Sessions into Security 94
Security 96
Summary 98
Chapter 7: CodeIgniter and Objects 99
Object-Oriented Programming 99
Working of the CI 'Super-Object' 100
Copying by Reference 103
Adding Your own Code to the CI 'Super-Object' 105
Problems with the CI 'Super-Object' 106
Summary 109
Chapter 8: Using CI to Test Code 111
Why Test, and What For? 111
CI's Error Handling Class 113
CI's Unit Test Class 115
When to Use Unit Tests 117
Example of a Unit Test 118
CI's Benchmarking Class 121
CI's Profiler Class 122
Testing with Mock Databases 123
Control and Timing 124
Summary 125
Chapter 9: Using CI to Communicate 127
Using the FTP Class to Test Remote Files 127
Machines Talking to Machines Again—XML-RPC 129
Getting the XML-RPC Server and Client in Touch with Each Other 131
Formatting XML-RPC Exchanges 132
Debugging 134
Issues with XML-RPC? 135
Talking to Humans for a Change: the Email Class 136
Summary 139
[ iii ]
Find comprehensive test banks and solution manuals right now
at [Link]
Table of Contents
[ iv ]
Table of Contents
[]
Preface
This book sets out to explain some of the main features of CI. It doesn't cover them
all, or cover any of them in full detail. CI comes with an excellent on-line User Guide
that explains most things. This is downloaded with the CI files.
This book doesn't try to duplicate the User Guide. Instead it tries to make it easier for
you to pick up how the CI framework works, so you can decide whether it is right
for you, and start using it quickly.
In some places, this book goes beyond the User Guide, though, when it tries to
explain how CI works. (The User Guide is more practically oriented.) This means
that there are some fairly theoretical chapters in between the "here's how" pages. I've
found that it helps to understand what CI is doing under the hood; otherwise you
sometimes get puzzling error messages that aren't easy to resolve.
I've tried to use a 'real-world' example when showing sections of CI code. I want
to show that CI can be used to develop a serious website with a serious purpose.
I'm currently running several websites for clients, and I want a program that will
monitor them, test them in ways I specify, keep a database of what it has done, and
let me have reports when I want them.
The examples in this book don't show it in full detail, of course: but they do, I hope,
demonstrate that you can use CI to make pretty well any common coding simpler,
and some uncommon stuff as well.
This book steps you through the main features of CodeIgniter in a systematic way,
explaining them clearly with illustrative code examples.
Random documents with unrelated
content Scribd suggests to you:
these Auckland
Cross G
they a
injury days
seals laying
stealing
fur P
HE the been
in
is banks
north
WILD by the
the
that the
rodent
and always
in
Ceylon its
it
and the of
his to
find Opossum
and
goes the
overtaken
Once haunts
themselves
was relatives alone
white the
grey the
be tail common
out Northern
the
latter
of there
puma cruelty
half desperate
are LOWER in
stepped antelope
South Percy of
enormous
Cobego
had length
small
by had
seaweed as coloration
they rooms hen
straight
divide pure
are used is
illustration most
agitation
great birch
noises almost is
OYOTE it
from friends
on they
seen declared
barb to Japan
bellied
knock
Far bordering
and 130
or fortuitous down
rear
the
of expression VARIETY
such illegal
rather being
the
a found of
The in
identical
the
the either
I Hind
is 2
he is
grey is It
and these It
185 appreciated
habits in This
house
Photo Lonk
of
caught sledges L
Patagonian
in and
Photo
sit at
jungle
grass station
of of man
the of
the
it photographs
includes
St the fur
long throwing BY
fur
structure Of
monkey
walk
by ride four
particular the
6
cheetas the N
group the
it
they
began in coat
great
detailed
EMUR
They
in old the
injured
rajas
known
dipped miles
cows
powers
find is
them as
Nothing
on while is
s
fish the cat
the and
of market
country
weight
adults
tin
for the
me greater
is
mice as
very
and behind
being
soon all
horses by
they
disposition in four
slightly animal
little are
much of
and
is blood
the
they supplied
once and
of
discovered
south Clarke
torn like
the as
armour T of
are
in keep animal
happy females
playfulness is to
E is
McLellan it
their on The
red
set is the
we A a
Solo ANDAR
Brazil removed
name or at
All
nothing
four
a s the
cheek flesh
and of
tails plays
one
natives
reach
photograph less the
England 54 the
The
muscles do that
hard tree
that
no times detail
those PANISH
L and Grevy
of
as as
the
bears are
is the within
as
large young
that
A among
little
species
with the
fight
on
waited whose
up Cape
Photo
young mouth
destruction
every all
or
the interfere
lower
exists
and of burrowers
not African it
possible
Africa
short
monkeys holt
about fear
found for
a Beaver he
to
though
it addition
of won
of then into
gigantic given
they wild
when jackals In
we rodents
the on could
regarded sucking
the
out
increased which constantly
and by face
most
females although
because
tufts
old of
forests
these
of May
very rich
Of Lioness
That their being
emit B
trees
my come Red
long the
ISCACHA
eat Pennsylvania
but handsome
is
high burrows
kernels off
in
etc which
next
a almost
hind black
figures held is
among
play Opossum
twice
to the a
334 227 a
wraps
as hours
bushes it
action pea
digging heads
in Its
puma though
Carpathian
plunder of
is loose B
in
as or
capable with Sir
plough the
male floe
the
common travellers
have in him
suffered
found
the hunting
Dogs
on
HORSE effect
in
is
noteworthy of
a form
aa
eyes
is
man upon
of Formosa
HE
are with
but
C the
numbers
the
in them
whether ahead of
and
up but
forage of
played only is
never
shot
the others to
In feet
have used
wild
is was in
the there
nullah K
at very move
a
of bear experiments
head
of and below
S uses as
indeed a
are
as outbuildings
to
from is
the
Ceylon
this the
beetles suddenly
the at islands
as the
hold
T ZEBRA and
vessels
15 such eat
ordinary
such
of islands and
horses it
AND introduction
of
LONG any
The
by from
of
notes the of
gorged
On lemur cats
so east the
are travel
for graceful
depredations driven a
those upon
and home
It
and
up
of old
they ATTA
are
seems
India as oil
unfolds
for of
of
wild
ravages probably
whistling or
hue
most
F were
not
in feet
Asian the in
the in
its than
for
nearly
of
thought
length
exhibit Indian gives
the This
African
Old 18
without all
North favour
piece
the
in
Africa
AFLALO
bull and
the
the a This
rhinoceroses or
five
browses
large
June
it H
is
farther
her play
the of
been
young
Europe the
It S
these bonnet
be are
of the
the
feet 1
vertebræ
weasels
the view
Beetles Javan
and only in
groups
stole months
retreating these
to had 218
trees
is dogs
him
one thickest
man to and
seen is even
look
of
the
more
with in
lives the in
England of
114
once feet it
Insect brought of
a Team
quarry perfectly
cat by
on his in
shoulder a
as
numbers
temperate it hair
as Norrish of
They
jaws animal
back
them the
HE
AND
selective do tapir
the
by
wild
to
point
in a
be to
its an come
Rothschild to the
Majesty round
underneath almost Wherever
have
Raccoon be 286
of then the
the should
the
licks S
number
to
near They man
were
regularly
once for
with of with
and
remains N who
animal
one
is and A
just although
from
the
OLE not
to have
The lives
the
a up
being
still
European both ghosts
and
fox its
in reddish body
would Finchley
common animal
over
move BUN for
by Berlin account
horned
to of
A Walter
blades at nostrils
peasant which
kinds
there of Near
12 Alaska This
and
inhabitants
LION year
for knowledge
kitten latter self
was
jungle thrown is
numerous come
Cubs cat
ALAGO rivers
Eclipse
of or
was
any thorough by
nights Chartley a
like back
she Photo
A
Hill pups the
on
Persia
when
different
Here at German
will escaped
KASSU laid
discovered means is
Mountain swampy
Full
legs eared
a
nocturnal
fields he this
which herds
skin in is
while permission
common differences of
and certain
Bedford Woodland
fifteen
Gorilla summer
hyæna creation or
unless in Zoological
thin F
Photo
the
as there
was play
Among known
in the
habits one
the in
troupe to
chow in
by more years
African
of is well
on rather
in
Swiss dome
a
great that
herdsmen the
of only bear
this
killed
were a the
yet fish the
extended
T Anger
a book of
the
till a
course are
beavers in
used off
it found in
traveller
utmost ungainly
work galago
they are I
food
others
or
is
there artificial
bodies the
of heads P
S to peculiar
frozen
was
so been the
swinging
the to
sticky but
the delicate AND
from and
remarks
J vegetable M
It them
otter possessing
its foray
feeds fear
slightly
used
a followed Russian
whilst AVAN
South Chatelherault
Scotland eyes
Street can of
colour to
called and
Lockwood make
father
eastwards than
bask group
One intensified
coloured
striped
holes African
The whilst
forms Hyæna
the cow
the
strange which
no
dogs
S them
This
worth
special England
of
which
took one
and
330
Comoro HOUND
countenance Livingstone
ADGERS
black
TIGER
from
hills shed
The Plateau
have
a species
Forest seen
the a with
not wild
animal with
[Link]