"> ">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

PHP Framework Presented by Phil Barnett LEAP Meeting November 21, 2002 Copyleft 2002, Phil Barnett.

Similar presentations


Presentation on theme: "PHP Framework Presented by Phil Barnett LEAP Meeting November 21, 2002 Copyleft 2002, Phil Barnett."— Presentation transcript:

1 PHP Framework Presented by Phil Barnett LEAP Meeting November 21, 2002 Copyleft 2002, Phil Barnett

2 void ob_start ( [string output_callback]) This function will turn output buffering on. While output buffering is active no output is sent from the script (other than headers), instead the output is stored in an internal buffer. The contents of this internal buffer may be copied into a string variable using ob_get_contents(). To output what is stored in the internal buffer, use ob_end_flush(). Alternatively, ob_end_clean() will silently discard the buffer contents. An optional output_callback function may be specified. This function takes a string as a parameter and should return a string. The function will be called when ob_end_flush() is called, or when the output buffer is flushed to the browser at the end of the request. When output_callback is called, it will receive the contents of the output buffer as its parameter and is expected to return a new output buffer as a result, which will be sent to the browser. Note: In PHP 4.0.4, ob_gzhandler() was introduced to facilitate sending gz-encoded data to web browsers that support compressed web pages. ob_gzhandler() determines what type of content encoding the browser will accept and will return it's output accordingly.

3 index.php3 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/strict.dtd"> tag -->

4 header.htm Everything Linux! ---------------------- Header Ends Here ---------------------

5 mainbody.htm Everything between the header and the footer comes from mainbody.htm. It's just a file that contians the body of content for your sites main page. You can put any text or highly formatted html here. This is just ordinary text. You can put formatting in it, but it should not contain header or body tags. (should be monospaced and indented 10%) You can inherit from the style sheets! A perl script regex to find CRLF/CR/LF and replace with <P> is appropriate. This text or content could come from a form using the POST method for dynamic content, it could come from a database, or it could be static content mixed with both of the above. (think /.)

6 title.htm Linux Rulez!(and so does Open Source!)

7 metatags.htm

8 style.htm BODY { background-image: url("blustripe.jpg") } LI, H1, H2, H3, H4, H5, H6, TABLE { font-family: sans-serif } P.header { margin-left: 10%; margin-right: 10%; } P.margins { margin-left: 5%; margin-right: 10%; } TABLE.header {background-image: url(grey-striped.gif)} TABLE.mainbody { font-size: large } TABLE.menu { font-size: medium; text-align: center; background-color: #fff5c5; border-right-width: thick; border-color: #ffe98a} TABLE.submenu { font-size: medium; text-align: left; background-color: #ffbbcc; border-right-width: thick; border-color: #bbbbbb} P.monospace {font-family: monospace; margin-left: 10% } TD.content { font-size: small } P.content { font-size: small } P.banner { font-size: xx-large; color: blue; font-style: bold; text-align: center } P.header { font-size: medium; text-align: center; font-style: italic } P.footer { font-size: medium; text-align: center; font-style: italic } P.copyright { font-size: large; text-align: center; color: green } P.funcky { font-size: medium; color: purple } Reference: http://www.w3.org/Style/CSS/

9 footer.php3 ---------------------------- Footer Begins Here --------------------------- Last Maintenance: November 21, 2002 Copyleft 2002 Phil Barnett. All Rights Reversed.

10 mainbody.htm Everything between the header and the footer comes from mainbody.htm. It's just a file that contians the body of content for your sites main page. You can put any text or highly formatted html here. This is just ordinary text. You can put formatting in it, but it should not contain header or body tags. (should be monospaced and indented 10%) You can inherit from the style sheets! A perl script regex to find CRLF/CR/LF and replace with <P> is appropriate. This text or content could come from a form using the POST method for dynamic content, it could come from a database, or it could be static content mixed with both of the above. (think /.)

11 mainmenu.htm Menu Foo Foo Foo Bar Bar Bar Baz Baz Baz Feedback Home Page

12 strcasecmp() int strcasecmp ( string str1, string str2) Returns 0 if str1 is greater than str2, and 0 if they are equal.

13 master.php3 tag --> <? if( ( strcasecmp( $content, "master.php3" ) != 0 ) && ( file_exists( $content) ) ) {include( $content );} ?>

14 submenu.php3 Menu <A HREF="master.php3?content=bing.htm">Bing <A HREF="master.php3?content=bang.htm">Bang <A HREF="master.php3?content=bong.htm">Bong Home Page


Download ppt "PHP Framework Presented by Phil Barnett LEAP Meeting November 21, 2002 Copyleft 2002, Phil Barnett."

Similar presentations


Ads by Google