Assignment =S)
Explain the concept of senbegys 30.) PHP and ATAK
The PROLEA of ceeatthg a dynamic webage
~Ecation and, UBIRg PHP and ATAX allovsg
SVELCEEE “LD GUEld pouRsfiel, a Kull PARP:
TASES & Sele 2H” ord sax appltaténr
HTML and Tava.sceipt code:-
PHE and ATAK Example
' PHP and Asax Example 2] h,>
Entex yous Mame:
<9 pak type = “tence” Id ='name"> |
|
| 4 buckton 9q Chick = "get Gaeeting ee "seb lets
| 2£p%d = Ngseeting's dlp> |
4lbody > |
|
eho
code
@next, Ceate g NeW Fle named gueetg
SP GOUSt PERCE oldest and add ‘Faltoudng eHe
<4 Phe
Se Cre seth C4—Grgt Frame’) 2game =html Special chang ($ - GET Crasve"}) :
echo " Hello, "ag name. 1",
§else $
Scho “please psavide a name”.
1 4
b>
i Then update tne PHO code fa gektiag - ohp
<2 php
| Fe Us set (q- Pest name) 5
NTE = bmd (Spectr cf,
Echo “Heu9,". gname-"|
Gedlse $
AN§ G-PesrCaane')
| , “Please, ABovide name",
Pa
* RAS Pending th aup Sed Ayer.
foxy Rardting exsiss fo Agax weqneats you
BN Use the MLKBOK,
even Of Che “mL Http
ReQpest Owjeck.Explain {n dekotl Oom and Posisexg Suppasted
by -OoM-
®) x ThE document Okfeck madel i a paqguarrtng
FOI fos HTML and XML documents:
* °
Se dekiness tine Copfical SESUCKLBE OF document
= the Sears, D docemenk 1S acc3ersedl § manieutal
* ry
WE eon rnodify ow deleke thers Content ¢
2180 cseate Meco elemenkg.
ie Rasigey « g, .
1@ xm -
OARS ERESSE- aes xen passe, {3 9. Shoo Keser
O%
| Package thak proves TrtesFacess fox
ends feat?
Apelication 4, wowsk an xme document
XML [Aer
SF} pases Ly CUe nds
AP PU cation
wwe!
HK TyRed of x
RIESE SF Ark aes.
THRHE AME 4.0 typed oF Henk CASE.
om:
® sav. as 4]
&Dom >
Ww
2, Q& Com posaeH,
* DOM APT is Ymplemented boy
x iT UE,
cokich eNORY easy {| Simele to
* Prsst, fe ~weads the cohole xmL docurnenk into
HR Fase OF a. EECE to StS Tin memesy.
* TE TS an event dxen Apt asd i's Saplernented
by sAX pasisen.
“KE Tk wead the xml ceeument Une by Une Pion
Stastt to Ptigh.
@ Explain ty detaw scope af \asmakles in PHP:
RHE Vasile Roope.
SLHOMR OD Cohese,
the cade:
The Scope of a, vastiable
TE can be accesped withio
@ bocal Serpe 668) Local Vasiable
ARN AR A SE NaSurable: kK
Nestabless destasied utthtn a funckion
have Local scope and cannot be axceaged
astside the funcktsn-xr <9 php
$ num = 60;
Function local vas 0) $
4 num = 50;
echo "Vostiable num hatte the Runctian:{ nue
Weal-vasic);
echo “asimaHe AaM qutside Funckton 1S $eusn’,
us
© siobal scape (ad Global REY a 'eadim
He Nasfablets declased outsi
| asre called glabal \rasratless:
B= 29 phe
| $ Nur = 20;
Function gloeal Vox c) $
| Qlabal num;
€cho “ yasirable num “nasde. funckion:d numo'
y
Qlobal vast cy;
echo " Nastfable nun outetle Function :4 cum pr
2ES
LE 18 chasiactengticds dF CHE bo delete we
Vastiable once TS compleken %bQ enecubton ond
The memarty fs Fixed.
Br <9 Ahp
Function gtaie ~Vas1C) 5
Static $ ruen = D
$ Sum < 2;
% Sum++,
g AGM ++;
Echo 4 ~ server (Ferver
NAME’).
)>@
|
Explain ‘tne Fallout sth eatemple:
© Fox G) castle. G do-uxle: G fos each
© fost RHE Fox Looe 13 wed when You Krdus
PXackly hou enany -efaneds You wart to Hetate|
Bough a block of cade:
8 ope
Suntes Coy (aretta tag dton: cordétfon; Lraserent/oecsesn
‘TI code to be encecuked:
y
&X> <7 php
Fox C$ acum <1; gnume=s, dnusmt =i §
echo ¢ num.” ";
a
?2>
@ cohile : m
nO TRE while Loop 1S also an entyy conbsol
Loop Cke Fox Loops:
PERI cattle Gondition) §
I] BAG to be excosed
3
Peex 29 PAP
RE
g$ num |;
otile, (g nur <-93
echo g num.” ”;
$ nuen +4;
g
?>
do wotile
LO hile tKe G0 while op & an RRRKE Conbxol
loop cohich MEAN, TE Ege erterg the Lop,
Che Statements and chen Checks he conden.
UR to be exceuted
& cobile Condition);
RO £9 php
$ mum = Vj
dos
Echo J nam.”
$ num+t;
% cstile (¢ cum 229);
essya aR eS
@ Explain tm dekoll cperatosg Yn PHO 51 Fossey
tO P
PHP operiatmg % a syreo) vel
Fallow:
AN Operands: They ae I
® Axitinmetic opemakoy
® Copycat :
@ compas®efon:
® Assignment 1
® Tresement [Decxement operates:
© Reithm atic Qpsratosg :- THR asiithonadcic opeatnsg
OME ued fo Pesfasm single mathe motical
Uke, Add, Sab, mouete:
operates | Name |} Synbapt apenatton.
+ AdIEON | 4204494] samy
= subbtackion $x-$y OtFFeKENCe -
xR muutinlicnty dor ed y | xoduck
ONION $X/4dy | Quobient:
* * Jexponent $xowKdy] gor, saised
T_ [ecdulus| for 4 dy | Remaiindes§ @ Lagi’ you con use Log tal eperakey faite
| & perfese Layical OPLHALE ON MAILS expression.
opexatny | Nasne | Syntas | opextation.
and — |Logfeal and] gacandhy | Tee *F both
o4 Lage OR $20 o8 $y | rxue F cithex
KOR | Logyeal x08} fae ow d4 | tTyue WF elton
a Legal NO) doc ee dy | reue IF both
y LYBLR Iga dy | oyue te Seer
d Logical not ge Taue, 16 $C is False:
@ Tectemens [Decrerent Rosier mene ane, cated
The NAD) QPEHAkAy A they LOOK on siagle
qpenends:
operates | Name | Syntane | operation.
oee PEE Trexemet] +44 TC | FREE Tresemends
qee by!
a pae-decnereit] -~ Fivst decrements
was
. POSE aeeser Fae 4 is oes
-enk Frsst cetusin dc]
om post-deoe| OC -- | Feet xenaragar
nentG@rpleko %. detail nodes fle sepeem?
@® The ile gystern module fn code. js eyevides an
ARI fess fnteracking watth fo Fle, system:
gp Reisen owes He SCE
6 DED Cle te Fs-pendd mettod 1 Cente, Sead,
Lasite g, - lage, made..catteast)
OSS Fes onen (Path, Hag
AX const Fs = Begudie ("es');
Conmale: (oq Cogesing ele | %;
fs: open Cineut: Gack", "y 4” 1 Funckion (essed) 3
YE (esd) $,
BAKU Conagle exseK (ers) 5
Corssole-Log (/' gle, open ssce fully!)
wD:
ERG 2s a File:
BES Congk eg eqs (" ¢s),
CONSE bUF= Meu Bulk (1028),
CONSOLE: Log (opening ain encisting File");
FS-OPen Cine occ +") Sy." Function (23,8) ¥
if (@88) 3
®SELLA Console: expoy (ex);
4
CORBOLE- Log ( ¥le opened Seaccefutl 1"),
Cangole: 609 (“seading the ile’);
4);
X15) gobibinag a filer
Syntace: FS write Fle, (Path, data, callie’)
EX Cong eg = weqTE ("E5),
Console: Log Cussibing fnto endsting File’),
FS: covite fle Chuck tact) This 18 KHIT)) (O9d 4
HF (20 9
SEELSIN Console: exgos (oe);
y
Conssgle. Log Catto, usitlen Scene),
Console: Lory (‘leks wead Newly Csttten data),
a);
© explatn Stoinge , objects, and osotay Sy angulad Ig
WIth escample.
®@ dota binding 1s a Neny use ord poweral
Featuseh Used Tn the sles development terhrtQues* Angulast Js QbyectS+
Te RS
- : sall roy Z/e>-
Synbone 2E> Roll no 2 Sstudent 4
A THQ’
S - Fest Name+" "+ (asknomel)
unEacts 2 O> Hella $3 student -F% oe
* ‘
PGW Tg pea:
Suntan: £P>masiks [math] :4§ mosk (IY z/P>-
Cm Zhe
Zheads
< title PANQUIAS TS Expyeagfonds Z| bibles
Sample APPLatesp alins
Hello Lsbudenk Hest name +" “stidenf.laat
nameyy 4/0>
ZPD ErMENDE, ON BOOKD: $F cast +f quantieyyy Refer
ZP> Roll nor LE student gall nog de>LP> eck Comat) 1] reas B84 2/0
£]aiv>
< seaibe s8¢= htte =] Aare gogle.a P'S» Cemlajasr/Libs /enin ss
4/scesipts
Albtmls.-
® chat 1S Foxm Nalidastion? Ut \asious Staten,
A sectives, & events.
Angulan zs POHFOKED sen, Nakdlaticn op the
Gert side. AMQulas Is mekneesy the state yf
the fos, ANd faput gles.
© ¢ untouched ak shoes Shad Fields bad nob touched.
@ 4 touched> Tp ShOWS that Field hag been touched
GW $ paige TE “eepretentg thak Field ham nat been
mod?ted:
KE Olveckives
Ae
OF eaistine - we MSPPESRNEY tak the Flald have ent
been mosicied:© 4 Valid Th Speck hak the foxen Conant % vall4
€) ¢ exeos- states the errack esos:
* cuentas
* Ng -cltck:
% TUQ~ dbl- click.
* PQ ~ erousse docu.
> CQ- mousse wp
2 NY maune enters,
NQ- roe (eave:
AY- Moune Moye:
eo MODE Quest.
an Key down
* ng. Key pues.
* ng change,
*
You might also like PHP Practical 1, 2, 3,5,8,10 PDF
PHP Practical 1, 2, 3,5,8,10
35 pages