Reply to Re: include code on server

Your name:

Reply:


Posted by Oli Filth on 06/06/05 00:54

Lee David said the following on 05/06/2005 22:49:
> Can you include common code in a script? What I'm looking for is
> eliminating the duplicate connection code to the database so if it ever
> changes I only have to update one place. I put an include where the code
> was, but that resulted in an error.

Would you care to share with us what that error was? Or do we have to guess!

>
> File x.inc
> variable1 = 'fred';
> variable2 = 'ginger';
> variable3 = 'rogers';
>
> File y.php
> include("x.inc");
> if (variable1 == "fred") yada, yada, yada
>

Umm, you're missing <?php and ?>, and $ prefixes to the variables names
(although I know that that isn't real code anyway)...

--
Oli

[Back to original 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

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