You are here: Re: How to keep global strings in another file? « PHP Programming Language « IT news, forums, messages
Re: How to keep global strings in another file?

Posted by Jerry Stuckle on 03/15/07 15:34

Sonnich wrote:
> On Mar 15, 3:32 pm, Floortje <l...@zingmaarmetmijmee.enel> wrote:
>> Sonnichschreef:> On Mar 15, 3:20 pm, Geoff Berrow <blthe...@ckdog.co.uk> wrote:
>>>> Message-ID: <1173963662.556376.252...@b75g2000hsg.googlegroups.com> fromSonnichcontained the following:
>>>>> something like error messages stored:
>>>>> <?
>>>>> $sError001="stupid user";
>>>>> $sError002="not available";
>>>>> ?>
>>>>> and then :
>>>>> include "errormsgs.php";
>>>>> echo $sError001;
>>>> Well yeah, that will work, so what is the question?
>>> The point it, that it does not work.
>> And his point is that it does work :-) You have another error somewhere
>> .. are you sure you have included the correct file?
>
> I found, that my problem is to include this into a class...
>
> include...
>
> class whatever
> {
> $somthing= $somthing_from_include_file.
>
> In other words, I want to export texts used in my class to a file...
>
> /S
>

It would help if you would post your entire code - not just little pieces.

For instance, your first statement was:

"I want to have a number of strings in another file, which I can include
everywhere... but I cannot make them reachable from the top file.".

Now you're saying:

"In other words, I want to export texts used in my class to a file..."

Two entirely different things.

And BTW - you should be using <?php instead of just <?. Most hosts
nowadays are running with short_tags_off.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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