You are here: Re: New to PHP help with breadcrumbs « PHP Programming Language « IT news, forums, messages
Re: New to PHP help with breadcrumbs

Posted by petersprc on 02/11/07 21:02

You can escape the single quote (\'). But you may want to just put the
content outside the script tags instead of putting it in a variable.

Here's a breadcrumb function that uses the file system to get path
info:

http://www.evolt.org/article/Breadcrumbs_for_PHP_Lovers/17/4455/

On Feb 11, 12:43 pm, "tommylux" <tommy...@gmail.com> wrote:
> Hi there So far I have designed a simple template file in PHP:
>
> <?php if(!$page) $page="home";
> if(file_exists("/my root/public_html/progress/$page.html")) {
> include("/my root/public_html/progress/$page.html"); } else {
> include("/my root/public_html/progress/404.html"); } ?>
>
> Where I want the breadcrumbs, i have a: <?php print($location); ?>
>
> and the content below breadcrumbs is: <?php print($content); ?>
>
> My example $page looks like this:
>
> <?php $location=" <a href=\"index.php?page=home\">HOME</a> &nbsp »
> &nbsp <a href=\"index.php?page=\contact">CONTACT US</a>";
> $content='<table border="0" cellspacing="0" cellpadding="0"
> dwcopytype="CopyTableCell">
> <td width="542" valign="top"><img src="img/mm_spacer.gif" alt=""
> width="305" height="1" border="0" /><br />
> &nbsp; <br />
> <table border="0" cellspacing="0" cellpadding="0" width="100%">
> <tr>
> <td height="35" valign="top" class="pageName">Contact Us </
> td>
> </tr>
> <tr valign="top">
> <td height="371" class="bodyText"><p>Your email has been
> received and will be answered shortly.</p>
> <p align="left"><img src="img/emailfire.gif" width="105"
> height="129" /> </p></td>
> </tr>
> </table>
> <br />
> &nbsp;<br /> <img src="img/mm_spacer.gif" alt="" width="50"
> height="1" border="0" /></td>
> </table>'; ?>
>
> Some pages dont work cause i use a ' symbol in the content.
>
> Is there a better way to do breadcrumbs?
>
> Thanks
> Tom

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация