|
08-20-2004, 01:39 PM | #1 |
Green Mole
Join Date: Aug 2004
Location: Chile
Posts: 13
|
A simple include in my php template doesn't appear
I made a custom template in php based on gaagle.html template... works fine.
But, I put a simple include (with <? include("linksites.php") ?> ) in my template but the include doesn't appear... ¿what's wrong? |
08-20-2004, 01:47 PM | #2 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
08-20-2004, 02:03 PM | #3 |
Green Mole
Join Date: Aug 2004
Location: Chile
Posts: 13
|
I do that, but doesn't work. The content of the include is:
<? include('config.php'); $rs=mysql_db_query($db,"select * from recomendados order by id asc limit 50"); while($row=mysql_fetch_array($rs)){ echo'<p align="right"><a href="'.$row["direccion"].'" target="_blank">'.substr($row["titulo"],0,17).'</a></p>'; } mysql_close($conectar); ?> That shows a list of links stored in a database, but doesn't shows the links, only shows a partial and literal include code. |
08-20-2004, 02:26 PM | #4 |
Head Mole
Join Date: May 2003
Posts: 2,539
|
Did you make the custom search page like in this post?
__________________
Responses are offered on a voluntary if/as time is available basis, no guarantees. Double posting or bumping threads will not get your question answered any faster. No support via PM or email, responses not guaranteed. Thank you for your comprehension. |
08-23-2004, 06:35 AM | #5 |
Green Mole
Join Date: Aug 2004
Location: Chile
Posts: 13
|
Thanks!
Finally I found the solution: In search_function.php, add the following code right after the function statement: ob_start(); require("my_include.php"); $my_include = ob_get_contents(); ob_end_clean(); then, add my_include to array: $t_mstrings = compact('my_include','powered_by_link','title_message','phpdig_version','re sult_message' ,'nav_bar','ignore_message','ignore_commess','pages_bar','previous_link','n ext_link','templates_links'); and insert <phpdig:my_include/> in the template file ... that's all. Thanks a lot for your time Charter! |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
show results in an include (php) | vuurvos | How-to Forum | 1 | 10-05-2005 06:44 AM |
include search.php | OceanSurf | How-to Forum | 1 | 09-08-2004 09:58 AM |
How to use PHP include to include the Google result pages? | sid | Coding & Tutorials | 1 | 01-07-2004 04:53 AM |
Newbie : How to include PHP file (.php) | frostbyte | How-to Forum | 1 | 01-04-2004 11:42 AM |
Using PHP include in templates | sid | How-to Forum | 3 | 11-23-2003 06:06 AM |