|
Posted by Jerry Stuckle on 09/30/07 14:03
Shelly wrote:
> "Jerry Stuckle" <jstucklex@attglobal.net> wrote in message
> news:v9udnTXx0NRPOGLbnZ2dnUVZ_o2vnZ2d@comcast.com...
>> howa wrote:
>>>>> And please don't top post. Thanks.
>>> On 9 30 , 2 42 , Jerry Stuckle <jstuck...@attglobal.net> wrote:
>>>> howa wrote:
>>>>>>> you 'll have problems if you call the function twice.
>>>>> On 9 29 , 9 10 , Jerry Stuckle <jstuck...@attglobal.net> wrote:
>>>>>> howa wrote:
>>>>>>> Hello,
>>>>>>> I have a function, e.g.
>>>>>>> function foo() {
>>>>>>> include("bar.php");
>>>>>>> }
>>>>>>> and the bar.php contain contents e.g.
>>>>>>> $global_v1 = "abc";
>>>>>>> $global_v2 = "def";
>>>>>>> I want to execute function foo(), but at the same time, let the
>>>>>>> variables declared in bar.php to have global scopem is it possible?
>>>>>>> Thanks.
>>>>>> You should not have an include within a function call. Among other
>>>>>> things, you 'll have problems if you call the function twice.
>>>>>> Actually, globals are bad things to use, anyway.
>>>>>> --
>>>>>> ==================
>>>>>> Remove the "x" from my email address
>>>>>> Jerry Stuckle
>>>>>> JDS Computer Training Corp.
>>>>>> jstuck...@attglobal.net
>>>>>> ==================
>>>> >
>>>> > this can be solved by using include_once.
>>>> >
>>>> > the reason of using function call to include is we want to
>>>> selectively
>>>> > include the needed files, prevent include useless files (i.e. factory
>>>> > method?)
>>>> >
>>>> >
>>>>
>>>> (Top posting fixed)
>>>>
>>>> It isn't that much overhead to include an extra file or two. But if you
>>>> do that a lot, perhaps you should examine your methods.
>>>>
>>>> And please don't top post. Thanks.
>>>>
>>>> --
>>>> ==================
>>>> Remove the "x" from my email address
>>>> Jerry Stuckle
>>>> JDS Computer Training Corp.
>>>> jstuck...@attglobal.net
>>>> ==================
>>>
>>>
>>> I am posting via Google Group, I am no control.
>>>
>>>
>>>
>> (Top posting fixed - again).
>>
>> Here's a clue. There's a key on the right side of your keyboard. It has
>> a little arrow pointing down.
>>
>> When you go to reply, you press that key until your cursor is at the end
>> of the message. Then you start posting your reply.
>>
>> Other google groupers have figured that out. Why can't you?
>>
>> A. Because they're either stoopid or just plain lazy.
>> Q. Why do they continue doing it?
>> A. People who refuse to post properly.
>> Q. Who are the most annoying people on the internet?
>> A. Because it upsets the normal flow of conversation.
>> Q. Why is it so bad?
>> A. Top posting.
>> Q. What is the most annoying thing on usenet?
>
> Jerry, as you know, I don't normally top post or botton post. I "in-line"
> post. However,
> (a) It is definitely NOT the most annoying thing on the internet and
> (b) There are times when a top post is appropriate, such as a one-line thank
> you, etc. It saves the reader from having to scroll down to find the new
> message.
>
> There are exceptions to all blanket statements -- including this one :-)
>
> Shelly
>
>
That's your opinion. A lot of people disagree with you.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|