Jump to content

simao20

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

simao20's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. [!--quoteo(post=377225:date=May 26 2006, 06:11 AM:name=poirot)--][div class=\'quotetop\']QUOTE(poirot @ May 26 2006, 06:11 AM) [snapback]377225[/snapback][/div][div class=\'quotemain\'][!--quotec--] Well, I can't tell what is the problem. IF it failed to include "layout.php" it should throw an error (fatal error: called to undefined function myheader...). I also can't understand it's purpose... The argument passed ($ptitle) is not used... I think the purpose is to waste some resources by increasing the overhead calling unnecessary functions. PS: Sinceramente, que treco horroroso! De onde vocĂȘ tirou isso? [/quote] This is the beginning of the example, just to show how it works, then it gets more complicated... Tirei isso de um livro que o criador de phpfreaks escreveu [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /] [!--quoteo(post=377245:date=May 26 2006, 09:04 AM:name=samshel)--][div class=\'quotetop\']QUOTE(samshel @ May 26 2006, 09:04 AM) [snapback]377245[/snapback][/div][div class=\'quotemain\'][!--quotec--] Do you see anything when u "View Source" the index.php page in browser...if yes please paste it here.... [/quote] nothing, a complete blank screen.
  2. [b]I'm reading a book called "creating interactive websites with PHP and web services", i've got to a part where the book tells me to write a php file called layout.php (code below)[/b] <? php function myheader($ptitle) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html> <head> </head> <body> <table width="100%" border="2" cellspacing="0" cellpadding="0" bordercolor="#000000"> <tr> <td colspan="3"><img src="pic/logo.jpg" width="150" height="112" /></td> </tr> <tr> <td>&nbsp;</td> <td> <!-- end header and begin content --> <?php } // close myheader() function footer() { ?> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </table> </body> </html> <?php } ?> [b]and the a file called index.php (code below[/b]) <?php include $_SERVER['DOCUMENT_ROOT']. '/layout.php'; myheader("Welcome to my Website!"); echo "Welcome to my Website!"; footer(); ?> ------------------------------ i understand what it's purpose, but the problem is that i get a blank screen when i run index.php. Can someone help me please. all the best Fernando Ribeiro
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.