|
Comments for: peter20000629
| Message # 1015269: |
|
Date: 01/24/03 21:47
By: Liz Subject: How to Code ASP "Includes" in PHP I'm used to using ASP includes with that simple reference files in relation to the doc root on my server. Imagine my confusion when I discovered that the PHP "include" and its cousin the "require" functions need a physical path. But I solved the problem. I develop Web pages using PHP on a Windows machine and upload them to my host's Linux server. I have a simple way that I handle "which way the slashes go." Here's a sample of how I use realpath and the right slashes to include standard footers in my pages. <? if (PHP_OS == "WINNT") { $slash = "\\"; } else { $slash = "/"; } $myPath = realpath("common").$slash; ?> <? require ($myPath."footer.php"); ?> |
Previous Message | Next Message |
| Comments: | ||
| RE: How to Link Mysql with vb | shyan | 06/21/05 05:05 |
| PHP to .net | Anjali | 06/08/05 01:33 |
| RE: How to Link Mysql with vb | Jayson Guillermo | 05/01/05 01:42 |
| RE: PHP files | Sean Redfearn | 11/24/04 05:34 |
| Good to see ur site | Abhishek | 11/06/04 09:07 |
| Rewriting Functions | Manutius | 12/02/03 03:25 |
| RE: PHP editor for linux? | Herman Tolentino | 05/14/03 11:00 |
| How to Code ASP "Includes" in PHP | Liz | 01/24/03 21:47 |
| conversion of ASP dll's | Mike | 11/05/02 21:24 |
| VB to PHP conversion | Russel | 10/23/02 05:08 |
| PHP editor for linux? | rnj | 10/18/02 22:21 |
| RE: font function not needed | Michael | 08/03/02 20:51 |
| RE: Dangerous people... | Scott Carr | 07/30/02 15:43 |
| RE: Victoria Bitter (VB) | Terrent | 06/25/02 08:36 |
| RE: VB v/s PHP | Simone Capra | 04/21/02 08:29 |
| Patching | cool keith | 02/24/02 16:27 |
| RE: How to Link Mysql with vb | Sly | 02/13/02 10:18 |
| RE: VB v/s PHP | Ricky Dean | 01/25/02 02:05 |
| RE: VB/ASP -> PHP | Richard Lanham | 01/21/02 07:39 |
| RE: PHP files | Andy | 01/16/02 21:54 |
| PHP? VB? Whatever.. | Jalal Maqdisi | 01/13/02 09:05 |
| Call to undefined function: mssql_connect() | stef | 11/27/01 07:49 |
| RE: How to Link Mysql with vb | d n g | 11/19/01 03:38 |
| RE: How to Link Mysql with vb | Lucian | 11/12/01 07:55 |
| How to Link Mysql with vb | Imthiaz | 11/01/01 23:24 |
| RE: PHP and VB | chad | 10/11/01 14:00 |
| i need a code to put one "news.html" in my hp | hugo | 10/03/01 12:59 |
| PHP(under Windows) and VB | I.Silviu | 09/16/01 17:31 |
| RE: font function not needed | Matt | 08/17/01 06:44 |
| PHP files | Sanchu | 07/09/01 04:49 |
| font function not needed | Mark | 06/23/01 06:59 |
| GREAT!!! | Jack Saunders | 05/09/01 08:43 |
| RE: PHP vs. VB | Dave | 05/01/01 05:07 |
| Homesite correction | Daniel Keep | 04/16/01 04:40 |
| PHP vs. VB | George Ob | 04/10/01 11:00 |
| RE: VB v/s PHP | Lee | 04/07/01 10:57 |
| RE: Dangerous people... | Charlie | 03/21/01 14:14 |
| RE: Hardest aspect for me | SonOfDad | 03/09/01 10:16 |
| RE: Victoria Bitter (VB) | Devon | 02/23/01 14:36 |
| RE: Victoria Bitter (VB) | Jesus H' Linux | 01/29/01 12:26 |
| RE: VB v/s PHP | Jesus H' Linux | 01/29/01 12:16 |
| RE: Victoria Bitter (VB) | Peter Moulding | 01/11/01 19:22 |
| RE: VB v/s PHP | Peter Moulding | 01/11/01 19:06 |
| RE: Hardest aspect for me | Peter Moulding | 01/11/01 18:51 |
| Hardest aspect for me | Mike | 01/10/01 04:54 |
| VB/ASP -> PHP | Ara | 01/07/01 02:55 |
| RE: VB v/s PHP | Digital Wokan | 01/02/01 17:51 |
| VB v/s PHP | David Greene | 12/28/00 21:58 |
| PHP and VB | Peter Dove | 12/04/00 13:29 |
| RE: Victoria Bitter (VB) | Mark Saunders | 11/16/00 22:41 |
| Victoria Bitter (VB) | Louis Zezeran | 11/02/00 06:35 |
| RE: PHP and VB | Neil p Davis | 10/23/00 12:32 |
| RE: RE: Dangerous people... | George Herson | 07/20/00 22:11 |
| RE: Dangerous people... | Tim Perdue, PHPBuilder.com | 07/13/00 12:03 |
| PHP and VB | Edward Brown | 07/06/00 11:23 |
| Dangerous people... | Luis Argerich | 06/30/00 16:33 |
|
If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly. | ||


