F3: рд╢рд╛рдирджрд╛рд░ рд╡рд┐рд╢реЗрд╖рддрд╛рдУрдВ рд╡рд╛рд▓рд╛ рдПрдХ рдЫреЛрдЯрд╛ PHP рдврд╛рдВрдЪрд╛





рдореИрдВ рдЖрдкрдХреЗ рдзреНрдпрд╛рди рдореЗрдВ рдПрдХ рд╣рд▓реНрдХрд╛ PHP рдлреНрд░реЗрдорд╡рд░реНрдХ рд▓рд╛рдирд╛ рдЪрд╛рд╣рддрд╛ рд╣реВрдВ рдЬреЛ рдХрд┐ рдореИрдВ рд╣рд╛рд▓ рд╣реА рдореЗрдВ рдЖрдпрд╛ рдерд╛ рдФрд░ рдЬрд┐рд╕реЗ рдореИрдВрдиреЗ рддреБрд░рдВрдд рдкреНрдпрд╛рд░ рдХрд░ рд▓рд┐рдпрд╛ рдерд╛ред



рдлреИрдЯ-рдлреНрд░реА рдХреБрдЫ рд╣рдж рддрдХ рдкреНрд░рд╕рд┐рджреНрдз рд╕рд┐рдирд╛рддреНрд░рд╛ рд░реВрдмреА рдврд╛рдВрдЪреЗ рдХреЗ рд╕рдорд╛рди рд╣реИред рдлреИрдЯ-рдлреНрд░реА рдХреЗ рд▓реЗрдЦрдХ рдХреЛ рдЕрддрд┐рд╕реВрдХреНрд╖реНрдорд╡рд╛рдж рдФрд░ рдХреЛрдб рд╕реНрд╡рдЪреНрдЫрддрд╛ рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рдмрддрд╛рдпрд╛ рдЧрдпрд╛ рд╣реИ, рдЬрд┐рд╕рдиреЗ рд╡рд┐рднрд┐рдиреНрди рдЕрдиреБрдкреНрд░рдпреЛрдЧреЛрдВ рдХреЗ рд╡рд┐рдХрд╛рд╕ рдХреЗ рд▓рд┐рдП рдЗрд╕ рд╕рд░рд▓ рдврд╛рдВрдЪреЗ рдХреЛ рд╕рдХрд╛рд░рд╛рддреНрдордХ рд░реВрдк рд╕реЗ рдкреНрд░рднрд╛рд╡рд┐рдд рдХрд┐рдпрд╛ рд╣реИред



рдлреИрдЯ-рдлреНрд░реА рдореЗрдВ рдПрдХ рдлрд╛рдЗрд▓ рд╣реЛрддреА рд╣реИ рдФрд░ рдЗрд╕рдХрд╛ рд╡рдЬрди рдХреЗрд╡рд▓ 55KB рд╣реЛрддрд╛ рд╣реИред рдЗрд╕реА рд╕рдордп, рдлреНрд░реЗрдорд╡рд░реНрдХ рдореЗрдВ рдирд┐рдореНрдирд▓рд┐рдЦрд┐рдд рдХрд╛рд░реНрдпрдХреНрд╖рдорддрд╛ рд╣реЛрддреА рд╣реИ: рдПрдХ рд╡рд┐рд╢рд┐рд╖реНрдЯ рдФрд░ рдХрд╛рдлреА рд╕реБрд╡рд┐рдзрд╛рдЬрдирдХ рдЯреЗрдореНрдкрд▓реЗрдЯ рдЗрдВрдЬрди, рд▓рдЪреАрд▓рд╛ рдХреИрд╢рд┐рдВрдЧ, рд╕реНрд╡рдЪрд╛рд▓рд┐рдд рд╕реНрдкреИрдо рд╕реБрд░рдХреНрд╖рд╛, рдпреВрдирд┐рдЯ рдкрд░реАрдХреНрд╖рдгреЛрдВ рдХреЗ рд▓рд┐рдП рдПрдХреАрдХреГрдд рдЙрдкрдХрд░рдг рдФрд░ рдХреЛрдб рдкреНрд░реЛрдлрд╛рдЗрд▓рд░ред



рдпрд╣ рдЗрддрдирд╛ рдЫреЛрдЯрд╛ рдФрд░ рддреЗрдЬрд╝ рд╣реИ рдХрд┐ рдЗрд╕рдХрд╛ рдЙрдкрдпреЛрдЧ рд╡реЗрдм рд╕рд░реНрд╡рд░ рдЯреНрд░реИрдлрд╝рд┐рдХ рдХреЛ рдирд┐рдпрдВрддреНрд░рд┐рдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рднреА рдХрд┐рдпрд╛ рдЬрд╛ рд╕рдХрддрд╛ рд╣реИред



рдпрд╣ рдПрдХрдорд╛рддреНрд░ рдлреНрд░реЗрдорд╡рд░реНрдХ рднреА рд╣реИ рдЬреЛ рдЖрдкрдХреЗ рдПрдкреНрд▓рд┐рдХреЗрд╢рди рдХреЛ рд╣реЙрдЯрд▓рд┐рдВрдХрд┐рдВрдЧ рдФрд░ DoS рд╣рдорд▓реЛрдВ рд╕реЗ рдмрдЪрд╛рддрд╛ рд╣реИред





рдХреЛрдИ рдлрд░реНрдХ рдирд╣реАрдВ рдкрдбрд╝рддрд╛ рдХрд┐ рдЖрдк рдПрдХ рд╢реБрд░реБрдЖрддреА рдпрд╛ рдкреЗрд╢реЗрд╡рд░ PHP рдкреНрд░реЛрдЧреНрд░рд╛рдорд░ рд╣реИрдВ, рдлреИрдЯ-рдлреНрд░реА рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдирд╛ рдЖрд╕рд╛рди рд╣реИ рдФрд░ рдПрдХ рд╣реА рд╕рдордп рдореЗрдВ рд╢рдХреНрддрд┐рд╢рд╛рд▓реА рд╣реИред рдпрд╣ рд╕реНрдерд╛рдкрдирд╛ рдпрд╛ рдПрдХ рд╕реНрдкрд╖реНрдЯ рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рд╕рдВрд░рдЪрдирд╛ рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рдирд╣реАрдВ рд╣реИред рдпрд╣ рдврд╛рдВрдЪрд╛ рдЖрдкрдХреЛ рдСрдмреНрдЬреЗрдХреНрдЯ-рдУрд░рд┐рдПрдВрдЯреЗрдб рдФрд░ рдкреНрд░рдХреНрд░рд┐рдпрд╛рддреНрдордХ рд╢реИрд▓реА рджреЛрдиреЛрдВ рдореЗрдВ рдПрдкреНрд▓рд┐рдХреЗрд╢рди рд▓рд┐рдЦрдиреЗ рдХреА рдЕрдиреБрдорддрд┐ рджреЗрддрд╛ рд╣реИред рдлреИрдЯ-рдлреНрд░реА рджрд░реНрд╢рди рдФрд░ рдПрдорд╡реАрд╕реА-рдЖрд░реНрдХрд┐рдЯреЗрдХреНрдЪрд░ рдХреЗ рд▓рд┐рдП рдЗрд╕рдХрд╛ рджреГрд╖реНрдЯрд┐рдХреЛрдг рд╕рдВрд░рдЪрдирд╛рддреНрдордХ рдШрдЯрдХреЛрдВ рдХреЛ рдХрдо рдХрд░рдиреЗ, рдЬрдЯрд┐рд▓рддрд╛ рд╕реЗ рдмрдЪрдиреЗ рдФрд░ рдХреЛрдб рд▓рд╛рд▓рд┐рддреНрдп, рдЖрд╡реЗрджрди рдкреНрд░рджрд░реНрд╢рди рдФрд░ рдкреНрд░реЛрдЧреНрд░рд╛рдорд░ рдЙрддреНрдкрд╛рджрдХрддрд╛ рдХреЗ рдмреАрдЪ рд╕рдВрддреБрд▓рди рдХрд╛ рдкреНрд░рдпрд╛рд╕ рдХрд░рддрд╛ рд╣реИред



рдлреИрдЯ-рдлреНрд░реА, рдврд╛рдВрдЪреЗ рдХреА рдХреНрд╖рдорддрд╛рдУрдВ рдХрд╛ рд╡рд┐рд╕реНрддрд╛рд░ рдХрд░рдиреЗ рдореЗрдВ рдорджрдж рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдкреНрд▓рдЧрдЗрдиреНрд╕ рдХреЗ рд╕рд╛рде рдЖрддрд╛ рд╣реИ:







рдпрд╣рд╛рдБ рд╡рд╣ рдлрд╝рд╛рдЗрд▓ рд╣реИ рдЬреЛ рдореБрдЦреНрдп рдкреГрд╖реНрда рдкрд░ рдЧреНрд░реАрдЯрд┐рдВрдЧ рдкреНрд░рджрд░реНрд╢рд┐рдд рдХрд░рддреА рд╣реИ:

  1. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { echo 'Hello, world!' ; } F3 :: run ( ) ;



  2. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { echo 'Hello, world!' ; } F3 :: run ( ) ;



  3. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { echo 'Hello, world!' ; } F3 :: run ( ) ;



  4. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { echo 'Hello, world!' ; } F3 :: run ( ) ;



  5. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { echo 'Hello, world!' ; } F3 :: run ( ) ;



  6. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { echo 'Hello, world!' ; } F3 :: run ( ) ;





рдХрд╛рдо рдкрд░ рд▓рдЧрдирд╛



рдзреНрдпрд╛рди рджреЗрдВ: рдХрд╛рдо рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рд░реВрдкрд░реЗрдЦрд╛ рдХреЗ рд▓рд┐рдП, рдЗрд╕реЗ рдХрдо рд╕реЗ рдХрдо 5.3 рдХрд╛ PHP рд╕рдВрд╕реНрдХрд░рдг рдФрд░ рдПрдХ рд╕реНрдерд╛рдкрд┐рдд рдФрд░ рдХреЙрдиреНрдлрд╝рд┐рдЧрд░ mod_rewrite рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рд╣реИ!



рдЗрд╕ рдЧрд╛рдЗрдб рдХреЛ рдмрд╣реБрдд рдмреЛрдЭрд┐рд▓ рдирд╣реАрдВ рдмрдирд╛рдиреЗ рдХреЗ рд▓рд┐рдП, рдореИрдВрдиреЗ рдПрдХ рд╕рд╛рдзрд╛рд░рдг рдкреБрд╕реНрддрдХ - рдЕрддрд┐рдерд┐ рдкреБрд╕реНрддрдХ - рдХреЗ рд▓рд┐рдП рдПрдХ рдбрд┐рдЬрд╛рдЗрди рдФрд░ рдХреБрдЫ рд╕реНрдкрд╖реНрдЯ рдХрд╛рд░реНрдпреЛрдВ рдХреЛ рд▓рд┐рдЦрдиреЗ рд╕реЗ рдмрдЪрдиреЗ рдХрд╛ рдлреИрд╕рд▓рд╛ рдХрд┐рдпрд╛ред



рд╢реБрд░реВ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП, рдЖрдкрдХреЗ рд▓рд┐рдП рд╕реБрд╡рд┐рдзрд╛рдЬрдирдХ рдХрд┐рд╕реА рднреА рддрд░рд╣ рд╕реЗ рдПрдХ рдбреЗрдЯрд╛рдмреЗрд╕ рдмрдирд╛рдПрдВред SQLite / MySQL рдФрд░ MongoDB рджреЛрдиреЛрдВ рдбреЗрдЯрд╛рдмреЗрд╕ рдХреЗ рд░реВрдк рдореЗрдВ рдХрд╛рд░реНрдп рдХрд░ рд╕рдХрддреЗ рд╣реИрдВред рдЪреВрдВрдХрд┐ рдПрдкреНрд▓рд┐рдХреЗрд╢рди рдШрд╛рддреАрдп рдФрд░ рд╕рд░рд▓ рд╣реИ, рдореИрдВ SQLite рдХрд╛ рдЪрдпрди рдХрд░рддрд╛ рд╣реВрдВред



рдореЗрд░реА Guestbook.sqlite рдбреЗрдЯрд╛рдмреЗрд╕ рдореЗрдВ рдХреЗрд╡рд▓ рдПрдХ рддрд╛рд▓рд┐рдХрд╛ рд╣реИ - рдЯрд┐рдкреНрдкрдгрд┐рдпрд╛рдБ , рдЬрд┐рд╕рдореЗрдВ рдлрд╝реАрд▓реНрдб рдЖрдИрдбреА , рд▓реЗрдЦрдХ рдФрд░ рдЯрд┐рдкреНрдкрдгреА рд╢рд╛рдорд┐рд▓ рд╣реИ ред



рдЕрдкрдиреЗ рдЖрд╡реЗрджрди рдХреА рдЬрдбрд╝ рдореЗрдВ index.php рдлрд╝рд╛рдЗрд▓ рдмрдирд╛рдПрдБ рдФрд░ htaccess рдлрд╝рд╛рдЗрд▓ рдХреЛ .htaccess (рд╕рд╛рдордиреЗ рдПрдХ рдмрд┐рдВрджреА рдХреЗ рд╕рд╛рде) рдХрд╛ рдирд╛рдо рдмрджрд▓реЗрдВред



рдЕрдЧрд▓рд╛, index.php рдореЗрдВ рдореБрдЦреНрдп рдФрд░ рдПрдХрдорд╛рддреНрд░ рдлреНрд░реЗрдорд╡рд░реНрдХ рдлрд╝рд╛рдЗрд▓ рдХрдиреЗрдХреНрдЯ рдХрд░реЗрдВ рдФрд░ рдбреЗрдЯрд╛рдмреЗрд╕ рдХрд╛ рдкрде рдирд┐рд░реНрдзрд╛рд░рд┐рдд рдХрд░реЗрдВ:

  1. requirement_once ( 'F3 / F3.php' ) ; // рдлреНрд░реЗрдорд╡рд░реНрдХ рдХрдиреЗрдХреНрдЯ рдХрд░реЗрдВ
  2. F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite: guestbook.sqlite) ) ) ; / * рдбреЗрдЯрд╛рдмреЗрд╕ рд╕реЗ рдХрдиреЗрдХреНрд╢рди рдХрд╛ рдкреНрд░рд╛рд░рдВрднред
  3. рдзреНрдпрд╛рди рджреЗрдВ: рдпрджрд┐ рдЖрдкрдХреЗ рдкрд╛рд╕ рд╕рдВрд╕реНрдХрд░рдг sqlite = 2 рд╣реИ, рддреЛ DSN рдХреЛ рдЗрд╕ рддрд░рд╣ рджрд┐рдЦрдирд╛ рдЪрд╛рд╣рд┐рдП:
  4. 'dsn' => 'sqlite2: guestbook.sqlite'
  5. * /


рдкрд╣рд▓реЗ рдЙрджрд╛рд╣рд░рдг рдореЗрдВ, рдЬрд╣рд╛рдВ рд╣реИрд▓реЛ рд╡рд░реНрд▓реНрдб рд╕рдВрджреЗрд╢ рдкреНрд░рджрд░реНрд╢рд┐рдд рд╣реЛрддрд╛ рд╣реИ, рдЖрдкрдиреЗ рдкреНрд░рд╕рдВрд╕реНрдХрд░рдг рдорд╛рд░реНрдЧреЛрдВ (рдкрде) рдХреЗ рддрд░реАрдХреЛрдВ рдореЗрдВ рд╕реЗ рдПрдХ рдХреЛ рджреЗрдЦрд╛ред рд╡рд╛рд╕реНрддрд╡ рдореЗрдВ, рдЙрдирдореЗрдВ рд╕реЗ рдХрдИ рд╣реИрдВ рдФрд░ рдЖрдк рдЪреБрдирдиреЗ рдХреЗ рд▓рд┐рдП рд╕реНрд╡рддрдВрддреНрд░ рд╣реИрдВ:



1. рд░реВрдЯ рд╣реИрдВрдбрд▓рд░ рдлрд╝рдВрдХреНрд╢рди - рдкрд╣рд▓реЗ рдЙрджрд╛рд╣рд░рдг рдореЗрдВред F3 :: rote () рд╡рд┐рдзрд┐ рдХрд╛ рджреВрд╕рд░рд╛ рдкреИрд░рд╛рдореАрдЯрд░ рд╡рд╣ рдлрд╝рдВрдХреНрд╢рди рд╣реИ рдЬрд┐рд╕рдХрд╛ рд╡рд░реНрдгрди рд╣рдо рдПрдХ рд╣реА рдлрд╛рдЗрд▓ рдореЗрдВ, рдХрд╣реАрдВ рднреА рдХрд░рддреЗ рд╣реИрдВ



2. F3 рдХреЗ рджреВрд╕рд░реЗ рдкреИрд░рд╛рдореАрдЯрд░ рдореЗрдВ рдЕрдирд╛рдо рдлрд╝рдВрдХреНрд╢рди :: рд░реЙрдЯ () рд╡рд┐рдзрд┐:

  1. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , function ( ) { echo 'Hello, world!' ; } ) ; F3 :: run ( ) ;



  2. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , function ( ) { echo 'Hello, world!' ; } ) ; F3 :: run ( ) ;



  3. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , function ( ) { echo 'Hello, world!' ; } ) ; F3 :: run ( ) ;



  4. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , function ( ) { echo 'Hello, world!' ; } ) ; F3 :: run ( ) ;



  5. require_once 'path/to/F3.php' ; F3 :: route ( 'GET /' , function ( ) { echo 'Hello, world!' ; } ) ; F3 :: run ( ) ;





3. рдПрдХ рд╣реА рджреВрд╕рд░реЗ рдкреИрд░рд╛рдореАрдЯрд░ рдореЗрдВ рд╕реНрдерд┐рд░ рд╡рд░реНрдЧ рд╡рд┐рдзрд┐:

  1. requirement_once 'path / to / F3.php' ;
  2. рдХрдХреНрд╖рд╛ MyClass {
  3. рд╕рд╛рд░реНрд╡рдЬрдирд┐рдХ рд╕реНрдереИрддрд┐рдХ рд╕рдорд╛рд░реЛрд╣ рд╣реИрд▓реЛ ( ) {
  4. рдЧреВрдВрдЬ 'рд╣реИрд▓реЛ, рджреБрдирд┐рдпрд╛!' ;
  5. }
  6. }
  7. F3 :: рдорд╛рд░реНрдЧ ( 'GET /' , 'MyClass :: hello' ) ;
  8. рдПрдл 3 :: рд░рди ( ) ;


4. рд╕рд╛рдорд╛рдиреНрдп рд╡рд░реНрдЧ рд╡рд┐рдзрд┐:

  1. requirement_once 'path / to / F3.php' ;
  2. рдХрдХреНрд╖рд╛ MyClass {
  3. рд╕рд╛рд░реНрд╡рдЬрдирд┐рдХ рд╕рдорд╛рд░реЛрд╣ рд╣реИрд▓реЛ ( ) {
  4. рдЧреВрдВрдЬ 'рд╣реИрд▓реЛ, рджреБрдирд┐рдпрд╛!' ;
  5. }
  6. }
  7. $ рдкрд░реАрдХреНрд╖рдг = рдирдпрд╛ MyClass ;
  8. F3 :: рдорд╛рд░реНрдЧ ( 'GET /' , рд╕рд░рдгреА ( $ рдкрд░реАрдХреНрд╖рдг , 'рд╣реИрд▓реЛ' ) ) ;
  9. рдПрдл 3 :: рд░рди ( ) ;


5. рдЕрдВрдд рдореЗрдВ, рд╣реИрдВрдбрд▓рд░ рдЗрд╕ рддрд░рд╣ рдХреА рдЕрдиреНрдп рдлрд╛рдЗрд▓реЛрдВ рдХреЗ рд╕рд╛рде рдПрдХ рдЕрд▓рдЧ рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рдореЗрдВ рд╕реНрдерд┐рдд рдПрдХ рдЕрд▓рдЧ рдлрд╝рд╛рдЗрд▓ рд╣реЛ рд╕рдХрддреА рд╣реИред рд╣реИрдВрдбрд▓рд░ рдлрд╝рд╛рдЗрд▓реЛрдВ рд╡рд╛рд▓реА рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рдХреЛ index.php рдлрд╝рд╛рдЗрд▓ рдХреА рд╢реБрд░реБрдЖрдд рдореЗрдВ рдШреЛрд╖рд┐рдд рдХрд┐рдпрд╛ рдЬрд╛рдирд╛ рдЪрд╛рд╣рд┐рдП, рдЬрд┐рд╕рдХреЗ рдмрд╛рдж рдЖрдк рдорд╛рд░реНрдЧ рд╣реИрдВрдбрд▓рд░ рдлрд╝рд╛рдЗрд▓ рдХреЛ рдХреЙрд▓ рдХрд░ рд╕рдХрддреЗ рд╣реИрдВ:

  1. //index.php:
  2. <? php
  3. requirement_once 'path / to / F3.php' ;
  4. F3 :: рд╕реЗрдЯ ( 'рдЗрдореНрдкреЛрд░реНрдЯреНрд╕' , 'рдЖрдкрдХрд╛рдкрде' ) ;
  5. F3 :: рдорд╛рд░реНрдЧ ( 'GET /' , ( : yourfile ) ) ;
  6. рдПрдл 3 :: рд░рди ( ) ;
  7. //yourpath/yourfile.php
  8. <? php рдЧреВрдВрдЬ 'рд╣реИрд▓реЛ рд╡рд░реНрд▓реНрдб!' ; ?>


рд╣рдо рдЕрддрд┐рдерд┐ рдкреБрд╕реНрддрдХ рдХреЗ рд╡рд┐рдХрд╛рд╕ рдХреЛ рдЬрд╛рд░реА рд░рдЦрддреЗ рд╣реИрдВред Index.php рдлрд╝рд╛рдЗрд▓ рдореЗрдВ, рдкреНрд▓рдЧрдЗрди рдлрд╝рд╛рдЗрд▓реЛрдВ рдХреЗ рд▓рд┐рдП рдкрде рдЬреЛрдбрд╝реЗрдВ - рд╣рдореЗрдВ рдПрдХреНрд╕реЙрди рдирд╛рдордХ ORM рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдЗрд╕рдХреА рдЖрд╡рд╢реНрдпрдХрддрд╛ рд╣реИ, рдЬреЛ рдлреИрдЯ-рдлреНрд░реА рдХреЗ рд╕рд╛рде рдЖрддрд╛ рд╣реИ:

  1. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; /* . autoload. .*/ F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ;



  2. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; /* . autoload. .*/ F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ;



  3. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; /* . autoload. .*/ F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ;



  4. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; /* . autoload. .*/ F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ;



  5. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; /* . autoload. .*/ F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ;





рдЙрдкрд░реЛрдХреНрдд рддрд░реАрдХреЛрдВ рдореЗрдВ рд╕реЗ рдПрдХ рдореЗрдВ рд╣реЛрдо рдкреЗрдЬ рдЕрдиреБрд░реЛрдз рдкреНрд░рд╕рдВрд╕реНрдХрд░рдг рдЬреЛрдбрд╝реЗрдВред рдореИрдВ рд╕рдмрд╕реЗ рдЕрдзрд┐рдХ рджреГрд╢реНрдп рдХреЗ рд░реВрдк рдореЗрдВ рдкрд╣рд▓реЗ рдХрд╛ рдЪрдпрди рдХрд░рддрд╛ рд╣реВрдВред

  1. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  2. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  3. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  4. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  5. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  6. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  7. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  8. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  9. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  10. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  11. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  12. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  13. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }



  14. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // foreach ( $all_comments as $comment ) { /* . , . */ echo ': ' . $comment [ 'author' ] . '<br />' ; echo ': ' . $comment [ 'comment' ] . '<br /><br />' ; } }





рдЦреИрд░ рдпрд╣рд╛рдБред рдЯрд┐рдкреНрдкрдгрд┐рдпрд╛рдБ рдкреНрд░рджрд░реНрд╢рд┐рдд рдХрд░рдирд╛ рдкрд╣рд▓реЗ рд╕реЗ рд╣реА рдХрд╛рдо рдХрд░ рд░рд╣рд╛ рд╣реИред рдЖрдк рдЬреЛрдбрд╝ рдХреЗ рд▓рд┐рдП рдЖрдЧреЗ рдмрдврд╝ рд╕рдХрддреЗ рд╣реИрдВред рд▓реЗрдХрд┐рди рдкрд╣рд▓реЗ, рдореИрдВ рдЦрд╛рдХреЛрдВ рдХреЗ рдмрд╛рд░реЗ рдореЗрдВ рдереЛрдбрд╝реА рдмрд╛рдд рдХрд░рдирд╛ рдЪрд╛рд╣рддрд╛ рд╣реВрдВред



рдЯреЗрдореНрдкреНрд▓реЗрдЯ рдХрд╛ рд░рд╛рд╕реНрддрд╛ рджреВрд╕рд░реЛрдВ рдХреЗ рд╕рдорд╛рди рд╡рд┐рдзрд┐ рджреНрд╡рд╛рд░рд╛ рдирд┐рд░реНрдзрд╛рд░рд┐рдд рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ:

  1. F3 :: set ( 'GUI' , ' ' ) ;





рдЖрдк рдХрд┐рд╕реА рд╡рд┐рд╢рд┐рд╖реНрдЯ рдЯреЗрдореНрдкрд▓реЗрдЯ рдХреЗ рд▓рд┐рдП рдПрдХ рдЪрд░ рдирд╣реАрдВ рджреЗ рд╕рдХрддреЗред рдлреИрдЯ-рдлреНрд░реА рдореЗрдВ рдЪрд░ рдкреВрд░реЗ рдЖрд╡реЗрджрди рдХреЗ рд▓рд┐рдП рдирд┐рд░реНрдзрд╛рд░рд┐рдд рд╣реИрдВред рдпрд╣ рдкрд╣рд▓реЗ рд╕реЗ рдкрд░рд┐рдЪрд┐рдд рд╕реНрдереИрддрд┐рдХ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░рдХреЗ рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ:

  1. F3 :: set ( '' , '' ) ;





рдЕрдм рдпрд╣ рдЪрд░ рд╣рд░ рдЬрдЧрд╣ рдЙрдкрд▓рдмреНрдз рд╣реИред HTML рдХреЛрдб рдФрд░ рд╕реНрдЯреНрд░рд┐рдВрдЧ рд░реВрдк рдореЗрдВ, рдЗрд╕рдХрд╛ рдорд╛рди PHP рдХреЛрдб рдореЗрдВ {@ рдЪрд░} рдХреЗ рд░реВрдк рдореЗрдВ рдХрд╣рд╛ рдЬрд╛рддрд╛ рд╣реИ:

  1. F3 :: get ( 'рд╡реЗрд░рд┐рдПрдмрд▓' ) ;


рдЯреЗрдореНрдкреНрд▓реЗрдЯ рдХреЛ рдХреЙрд▓ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП, рд╕рд░реНрд╡ рд╡рд┐рдзрд┐ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░реЗрдВ:

  1. F3 :: serve ( 'template.html' ) ;





рдЗрд╕ рдкреНрд░рдХрд╛рд░, рдореЗрд░рд╛ рдЖрд╡реЗрджрди рдЕрдм рдЬреИрд╕рд╛ рджрд┐рдЦрддрд╛ рд╣реИ:

  1. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  2. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  3. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  4. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  5. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  6. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  7. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  8. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  9. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  10. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  11. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  12. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  13. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  14. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  15. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  16. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>



  17. //index.php: <?php require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; // comments $all_comments = $comments -> find ( ) ; // F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } ?> <!-- template.html --> <F3:repeat key= тАЬ{@key}тАЭ index="{@comment}" group="{@comments}"> <p>{@comment.id}</p> </F3:repeat>





рдпрд╣ рдЙрджрд╛рд╣рд░рдг рджрд┐рдЦрд╛рддрд╛ рд╣реИ рдХрд┐ рдлреИрдЯ-рдлреНрд░реА рдЯреЗрдореНрдкрд▓реЗрдЯ рдЗрдВрдЬрди рдХреИрд╕реЗ рдХрд╛рдо рдХрд░рддрд╛ рд╣реИ: рдПрдХ рд▓реВрдк рдореЗрдВ, рдПрдХ рдЪрд░ рдХреЛ рд╕рдВрд╕рд╛рдзрд┐рдд рдХрд┐рдпрд╛ рдЬрд╛рддрд╛ рд╣реИ рдЬрд┐рд╕рдореЗрдВ рд╕рднреА рдЯрд┐рдкреНрдкрдгрд┐рдпрд╛рдВ рд╣реЛрддреА рд╣реИрдВред



рдЕрдЧрд▓рд╛ рдЪрд░рдг рдкреГрд╖реНрда рдкрд░ рдПрдХ рдЯрд┐рдкреНрдкрдгреА рдлрд╝реЙрд░реНрдо рдЬреЛрдбрд╝рдирд╛ рд╣реИред рдРрд╕рд╛ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП, рдкрд╣рд▓реЗ рдЯреЗрдореНрдкреНрд▓реЗрдЯ рдлрд╝реЛрд▓реНрдбрд░ рдореЗрдВ рд╕реНрдерд┐рдд form.html рдлрд╝рд╛рдЗрд▓ рдореЗрдВ рд╕реНрд╡рдпрдВ рдлреЙрд░реНрдо рдХрд╛ рд╡рд░реНрдгрди рдХрд░реЗрдВред рдореЗрд░реЗ рдорд╛рдорд▓реЗ рдореЗрдВ, рдкреНрд░рдкрддреНрд░ рдЗрд╕ рддрд░рд╣ рджрд┐рдЦрддрд╛ рд╣реИ

  1. < form method = 'post' action = '{PARAMS.0}' > <!-- PARAMS.0 --> < input type = 'text' name = 'author' / > < input type = 'text' name = 'comment' / > < input type = 'submit' / > < / form >



  2. < form method = 'post' action = '{PARAMS.0}' > <!-- PARAMS.0 --> < input type = 'text' name = 'author' / > < input type = 'text' name = 'comment' / > < input type = 'submit' / > < / form >



  3. < form method = 'post' action = '{PARAMS.0}' > <!-- PARAMS.0 --> < input type = 'text' name = 'author' / > < input type = 'text' name = 'comment' / > < input type = 'submit' / > < / form >



  4. < form method = 'post' action = '{PARAMS.0}' > <!-- PARAMS.0 --> < input type = 'text' name = 'author' / > < input type = 'text' name = 'comment' / > < input type = 'submit' / > < / form >



  5. < form method = 'post' action = '{PARAMS.0}' > <!-- PARAMS.0 --> < input type = 'text' name = 'author' / > < input type = 'text' name = 'comment' / > < input type = 'submit' / > < / form >





рдЗрд╕рдХреЗ рдмрд╛рдж, рдЖрдкрдХреЛ рд╕рднреА рдЯрд┐рдкреНрдкрдгрд┐рдпреЛрдВ рдХреЗ рддрд╣рдд рдлрд╝реЙрд░реНрдо рдкреНрд░рджрд░реНрд╢рд┐рдд рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП рдореМрдЬреВрджрд╛ рдорд╛рд╕реНрдЯрд░ рдкреЗрдЬ рдЯреЗрдореНрдкрд▓реЗрдЯ рдХреЗ рдЕрдВрджрд░ рдЗрд╕ рдлреЙрд░реНрдо рдХреЛ рдбрд╛рдЙрдирд▓реЛрдб рдХрд░рдирд╛ рд╣реЛрдЧрд╛ред рдРрд╕рд╛ рдХрд░рдиреЗ рдХреЗ рд▓рд┐рдП, рдЯреЗрдореНрдкрд▓реЗрдЯ рдХрд╛ рдЙрдкрдпреЛрдЧ рдХрд░реЗрдВ <F3: рдЯреЗрдореНрдкрд▓реЗрдЯ рдЯреЗрдореНрдкрд▓реЗрдЯ рдХреЗ рдЕрдВрджрд░ href = "form.html" /> рд╢рд╛рдорд┐рд▓ рдХрд░реЗрдВред рдореИрдВ рдЖрдкрдХреЛ рдпрд╛рдж рджрд┐рд▓рд╛рддрд╛ рд╣реВрдВ рдХрд┐ form.html рдлрд╝рд╛рдЗрд▓ рдЯреЗрдореНрдкрд▓реЗрдЯ.html рдХреЗ рд╕рдорд╛рди рдирд┐рд░реНрджреЗрд╢рд┐рдХрд╛ рдореЗрдВ рд╣реЛрдиреА рдЪрд╛рд╣рд┐рдП



рдЕрдм рдЖрдкрдХреЗ рдкрд╛рд╕ рдПрдХ рд╕рд╡рд╛рд▓ рд╣реЛрдирд╛ рдЪрд╛рд╣рд┐рдП - рднреЗрдЬреЗ рдЧрдП рдбреЗрдЯрд╛ рдХреЛ рдХреИрд╕реЗ рд╕рдВрд╕рд╛рдзрд┐рдд рдХрд░реЗрдВ? рд╕рдм рдХреБрдЫ рд╕рд░рд▓ рд╣реИред Index.php рдлрд╝рд╛рдЗрд▓ рдореЗрдВ, рдореБрдЦреНрдп рдкреГрд╖реНрда рдХреЗ POST рд╡рд┐рдзрд┐ рдХреЗ рд▓рд┐рдП рдПрдХ рд╣реИрдВрдбрд▓рд░ рдШреЛрд╖рд┐рдд рдХрд░реЗрдВ:

  1. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  2. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  3. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  4. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  5. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  6. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  7. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  8. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  9. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  10. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  11. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  12. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  13. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  14. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  15. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  16. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  17. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  18. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  19. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  20. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  21. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  22. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  23. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  24. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>



  25. require_once ( 'F3/F3.php' ) ; F3 :: set ( 'AUTOLOAD' , 'autoload/' ) ; F3 :: set ( 'DB' , array ( 'dsn' => 'sqlite:guestbook.sqlite' ) ) ; F3 :: route ( 'GET /' , 'home' ) ; function home ( ) { $comments = new Axon ( 'comments' ) ; $all_comments = $comments -> find ( ) ; F3 :: set ( 'comments' , $all_comments ) ; F3 :: serve ( 'template.html' ) ; } F3 :: route ( 'POST /' , 'savecomment' ) ; function savecomment ( ) { $comments = new Axon ( 'comment' ) ; $comments -> copyFrom ( 'REQUEST' ) ; /* , . copyFrom $_REQUEST */ /* ... * */ $comments -> save ( ) ; // $F3 :: reroute ( '/' ) ; // } ?>





рдЦреИрд░, рдпрд╣ рд╕рдм рд╣реИред рдиреНрдпреВрдирддрдо рдЕрддрд┐рдерд┐ рдкреБрд╕реНрддрдХ рддреИрдпрд╛рд░ рд╣реИред рдЗрд╕рдореЗрдВ рд▓рдЧрднрдЧ 30 рдкрдВрдХреНрддрд┐рдпрд╛рдБ рд▓рдЧреАрдВ!



рдлреНрд░реЗрдорд╡рд░реНрдХ рд╕рд╛рдЗрдЯ

рдлреИрдЯ-рдлреНрд░реА рдХрд╛ рдирд╡реАрдирддрдо рд╕рдВрд╕реНрдХрд░рдг рдбрд╛рдЙрдирд▓реЛрдб рдХрд░реЗрдВ

рд╕рдорд░реНрдерди

рдЖрдИрдЖрд░рд╕реА рдЪреИрдирд▓ irc.freenode.net рдкрд░: #fatfree

рдврд╛рдВрдЪреЗ рдХрд╛ рд▓реЗрдЦрдХ рдмреЛрдВрдЧ рдХреЛрд╕реНрдХрд╛ рд╣реИред рдпрд╣рд╛рдБ рдЙрд╕рдХрд╛ рдмреНрд▓реЙрдЧ рд╣реИред



All Articles