📄 phpl.html
字号:
<br><b><Mikkkeee></b> okay lets start
<br><b><AZTEK> to make a short list php can interact with orcale,mysqu,msql,mssql,access,and
many more dtabasses</b>
<br><b><Mikkkeee></b> ______ _______ ______ _______
<br><b><Mikkkeee></b> |_____] |______ |_____/ |______
<br><b><Mikkkeee></b> |_____] ______| | \_ |
<br><b><Mikkkeee></b>
<br><b><Mikkkeee></b> okay php lecture time
<br><b><Mikkkeee></b> lecturer=AZTEK
<br><b><BootError></b> Woot!
<br><b><HardW1r3></b> go aztek go
<br><font color="#FF0000">* BootError boos</font>
<br><b><font color="#000000"><AZTEK> thanx</font></b>
<br><b><BootError></b> No problemo
<br><b><Serial_Killer></b> np
<br><b><BootError></b> :))
<br><b><Mikkkeee></b> its all yours
<br><b><AZTEK> now anyone with any programming know how knows that programs
are no good without variables</b>
<br><b><AZTEK> well php uses the $ (us dollar) sign to decalre a variable</b>
<br><font color="#FF0000">* Balle[away] 0,12 Away 0,1 Balle 15is not here
11(0Im sleeping.. goddamit..11) (022:09:38 11)</font>
<br><b><Paya></b> like in Perl
<br><b><AZTEK> yes like in perl</b>
<br><b><AZTEK> but php does it little different</b>
<br><b><AZTEK> for an array</b>
<br><b><AZTEK> perl would use the @ sign</b>
<br><b><AZTEK> well in php their is no special sign</b>
<br><b><Paya></b> ?
<br><b><AZTEK> an array is defined as $hello[0]</b>
<br><b><AZTEK> as wih in perl it would be @hello</b>
<br><b><AZTEK> php like perl defines the variable type for you</b>
<br><b><FatalCure></b> so an array in php is deffined the same way a
variable would be in perl, as in $hello["1", "2", "3"]
<br><b><Mikkkeee></b> is it?
<br><b><AZTEK> so you dont have to define a variable as a interger or
a string explictly</b>
<br><b><BootError></b> kool
<br><b><FatalCure></b> aahhh
<br><b><Mikkkeee></b> k
<br><b><AZTEK> no in php you cant define multiple cells at once</b>
<br><b><AZTEK> as far as i know</b>
<br><b><AZTEK> so like $hello[0]="Hello"</b>
<br><b><AZTEK> $hello[1]=12</b>
<br><b><Paya></b> how do u mean "can't define multiple cells", then
PHP is a crap
<br><b><AZTEK> and $hello[2]="12" all work</b>
<br><b><AZTEK> its a downfall</b>
<br><b><AZTEK> you can define multiple cells</b>
<br><b><AZTEK> just not at once</b>
<br><b><Paya></b> great
<br><b><AZTEK> not like you had it</b>
<br><b><Mikkkeee></b> hey aztek if u got time at the end, get out some
precoded scripts and explain the code in each?
<br><b><AZTEK> ok</b>
<br><b><AZTEK> like the one for you</b>
<br><font color="#FF0000">*** bomb8595 has quit IRC (Quit: )</font>
<br><b><AZTEK> so</b>
<br><font color="#FF0000">*** bomb8595 has joined #bsrf</font>
<br><font color="#FF0000">*** DockAl[shower] is now known as DockAlfer</font>
<br><b><AZTEK> <?php</b>
<br><b><AZTEK> $hello="Hello";</b>
<br><b><AZTEK> echo $hello;</b>
<br><b><AZTEK> ?></b>
<br><b><AZTEK> gives us Hello</b>
<br><b><AZTEK> out to the screen</b>
<br><b><BootError></b> PHP reminds me of C, DOS batch file programing
and Basic
<br><font color="#FF0000">*** MANOWAR^ has joined #bsrf</font>
<br><b><AZTEK> exactly</b>
<br><b><AZTEK> now has anyone had any past experiance with Java,Javascript,C/C++</b>
<br><font color="#FF0000">*** Mikkkeee sets mode: +v bomb8595</font>
<br><b><AZTEK> Javascript is especially good</b>
<br><font color="#FF0000">* BootError has</font>
<br><font color="#FF0000">*** Mikkkeee sets mode: +v MrJezus|Gaming</font>
<br><font color="#FF0000">*** Mikkkeee sets mode: +v MANOWAR^</font>
<br><b><Paya></b> me, with C/C++
<br><b><AZTEK> good</b>
<br><font color="#FF0000">*** chiken has quit IRC (Quit: If I told you
I was lieing, would you believe me?)</font>
<br><b><MANOWAR^></b> -v plz
<br><b><Paya></b> Perl...
<br><font color="#FF0000">*** Mikkkeee sets mode: -v MANOWAR^</font>
<br><b><BootError></b> BASIC and C
<br><b><AZTEK> because as you will notice the syntax looks alot like
C/C++,Javascript,Java</b>
<br><b><AZTEK> and perl</b>
<br><b><Paya></b> hehe
<br><b><AZTEK> if your server uses Apache (almost everyone does) their
are predefined variables you can work with</b>
<br><b><AZTEK> like $REMOTE_ADDR will give you the clients ip address</b>
<br><b><Mikkkeee></b> back to the lecture plz
<br><b><AZTEK></b> yes it has to be caps
<br><b><Paya></b> u mean %ENV arrays
<br><font color="#FF0000">*** DreaMeR has joined #bsrf</font>
<br><b><AZTEK> yes the same thing</b>
<br><b><AZTEK> as it is in perl</b>
<br><b><Paya></b> $QUEARY_STRING...
<br><b><Paya></b> *$QUERY
<br><b><AZTEK> now to output a variable in php</b>
<br><b><AZTEK> same thing</b>
<br><font color="#FF0000">*** Canticle has joined #bsrf</font>
<br><b><AZTEK> you can use the echo command</b>
<br><font color="#FF0000">*** IriSh-IrO has joined #bsrf</font>
<br><font color="#FF0000">*** IriSh-IrO has quit IRC (Client exited)</font>
<br><b><AZTEK> so echo $hello;</b>
<br><b><AZTEK> would out put the the contents of $hello</b>
<br><font color="#FF0000">*** _newbie- has joined #bsrf</font>
<br><b><AZTEK> you can also use variable in strings</b>
<br><b><AZTEK> like in $hello="Hello, $world";</b>
<br><b><Paya></b> like in Perl print "Your age is: $age\n";
<br><b><AZTEK> the string would consist of the words Hello, and whatever
is in the variable $world</b>
<br><b><AZTEK> yes</b>
<br><b><AZTEK> thanks Paya</b>
<br><font color="#FF0000">*** Paya sets mode: +v _newbie-</font>
<br><b><AZTEK> now a thing that makes php great and gives it an advantage
over perl is</b>
<br><b><AZTEK> the valuse passed to your php script</b>
<br><b><AZTEK> via an html from are made into variable themselves imdiatly</b>
<br><b><_newbie-></b> does IIS support php?
<br><b><_newbie-></b> i mean, is there a plugin
<br><b><AZTEK> so <input type="text" name="hi"></b>
<br><b><AZTEK> yes it does</b>
<br><b><_newbie-></b> ah ok
<br><b><Mikkkeee></b> aztek will u got into db's?
<br><b><_newbie-></b> continue, i wanna learn php too hehe
<br><b><AZTEK> when sent to your programm the variable $hi will have
the value of that text fiels</b>
<br><b><AZTEK> *field</b>
<br><b><AZTEK> not today</b>
<br><b><AZTEK> maybe in a follow up tut</b>
<br><b><Mikkkeee></b> yup
<br><b><_newbie-></b> ok
<br><b><AZTEK> does everyone understand the basics of php variable</b>
<br><b><Paya></b> yes, continue
<br><b><_newbie-></b> yep
<br><b><FatalCure></b> uh huh]
<br><b><AZTEK> now another thing a script/programm can not be without
is flow control</b>
<br><b><AZTEK> the ifs, elseifs, and elses</b>
<br><b><marie></b> No, but it's alright. I need to go, goodbye.
<br><font color="#FF0000">*** marie has quit IRC (Quit: )</font>
<br><b><AZTEK> a if statment is the exact same as if it were in a C
programm</b>
<br><b><AZTEK> the syntax for a if stament is</b>
<br><b><AZTEK> if (condention) {</b>
<br><b><AZTEK> BLOCK of code;</b>
<br><b><AZTEK> }</b>
<br><b><AZTEK> if the condention exicutes to be true then the code inside
the brakets is executed</b>
<br><b><AZTEK> example</b>
<br><font color="#FF0000">*** _newbie- has left #bsrf</font>
<br><font color="#FF0000">*** DreaMeR has quit IRC (Client exited)</font>
<br><b><AZTEK> if($hello="Hi") {</b>
<br><b><AZTEK> echo $hello;</b>
<br><b><AZTEK> }</b>
<br><font color="#FF0000">*** vanished has joined #BSRF</font>
<br><b><FatalCure></b> can you set a verable to recive keystrokes and
then use that in an if statment?like STDIN w/ perl?
<br><font color="#FF0000">*** Mikkkeee sets mode: +v vanished</font>
<br><b><AZTEK></b> you can add ifelse to
<br><b><AZTEK></b> no
<br><b><vanished></b> thanks
<br><b><AZTEK> php is strictly a cgi language</b>
<br><b><AZTEK> ell not anymore but i will get to that later</b>
<br><b><AZTEK> so</b>
<br><b><AZTEK> if($hello="Hi") {</b>
<br><b><AZTEK> echo $hello;</b>
<br><b><AZTEK> } else {</b>
<br><b><AZTEK> echo "No Hello";</b>
<br><b><AZTEK> }</b>
<br><b><AZTEK> is an example of flow control</b>
<br><b><AZTEK> if the value of th variable $hello is not the string
Hi the the code in the else stament is executed</b>
<br><b><AZTEK> everyone got this so far</b>
<br><b><vanished></b> ya
<br><font color="#FF0000">*** Paya sets mode: +v Canticle</font>
<br><b><HardW1r3></b> yup
<br><b><AZTEK> you can have as many ifs anf ifelses as you need but
you can only have one else</b>
<br><b><AZTEK> or the engin will get confused</b>
<br><b><Canticle></b> ya.. when php code runs is it something like mod_perl?
Im a php newbie but Ive used mod_perl and perl
<br><font color="#FF0000">*** Kazzuyo has joined #bsrf</font>
<br><b><AZTEK> now i will go onto loops so those of you who don't understand
please speak up</b>
<br><font color="#FF0000">*** Mikkkeee sets mode: +v Kazzuyo</font>
<br><b><Kazzuyo></b> hi
<br><b><AZTEK> it can be a module in apache or an external program that
parsses the script and returns it</b>
<br><b><Kazzuyo></b> brb
<br><b><Canticle></b> so like perl?
<br><font color="#FF0000">*** Kazzuyo has left #bsrf</font>
<br><b><AZTEK> yes</b>
<br><font color="#FF0000">*** wishmaster has joined #bsrf</font>
<br><font color="#FF0000">*** ChanServ sets mode: +v wishmaster</font>
<br><b><Canticle></b> thanks
<br><b><wishmaster></b> yo all
<br><b><wishmaster></b> wasssup guys>?
<br><b><AZTEK> only the program or module has to be defined in the apache
conf files</b>
<br><b><Paya></b> we're in the middle of the lecture
<br><b><AZTEK> unless you wan to add #!/usr/bin/php</b>
<br><font color="#FF0000">*** Kazzuyo has joined #bsrf</font>
<br><font color="#FF0000">* Canticle nods</font>
<br><font color="#FF0000">*** _052_ has quit IRC (Ping timeout)</font>
<br><b><AZTEK> or whatever you php executalbe is and make it like perl</b>
<br><b><AZTEK> which is not recomended</b>
<br><b><AZTEK> the for loop</b>
<br><b><Mikkkeee></b> yo wish its a php lecture
<br><font color="#FF0000">*** Mikkkeee sets mode: +v Kazzuyo</font>
<br><b><AZTEK> anyone with a C/C++,Java(script) background know theis
next few</b>
<br><b><AZTEK> the for loop follows the syntax</b>
<br><b><_medved-></b> YO to wishmaster
<br><b><Mikkkeee></b> heh
<br><font color="#FF0000">*** Paya sets mode: -v _medved-</font>
<br><b><vanished></b> ya
<br><b><AZTEK> for (starting variable ; lopp unstill this is false ;
the increcment) {</b>
<br><b><AZTEK> }</b>
<br><b><vanished></b> for (i=0; i<10; i++)
<br><b><Kazzuyo></b> cool.....
<br><b><AZTEK> theis are very good for arrays</b>
<br><b><Paya></b> just like in Perl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -