php-windows Digest 10 Aug 2004 10:03:14 -0000 Issue 2354

Topics (messages 24373 through 24376):

Variables not passed through form
        24373 by: Anne Shroeder

Re: Passing arrays by reference
        24374 by: Justin Patrin

thanks
        24375 by: Ragnar

Howcan users download from site
        24376 by: oleks

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I've always used PHP on *Nix platforms.  So I'm assuming that this is a
windows issue.  Here is identical code
(1) on an MS server:
http://www.cgapdirect.org/annes/ProductCosting/contribute.php
(2) on a Linux sever:
http://www.language-works.com/cgap/contribute.php

The form variable values are displayed at the bottom of the page in (2) but
(1) ignores them entirely.  Why?

Anne

--- End Message ---
--- Begin Message ---
On Mon, 9 Aug 2004 17:28:40 -0400, Jim MacDiarmid
<[EMAIL PROTECTED]> wrote:
> 
> Hi everyone,
> 
> I've seen several examples of passing arrays by reference such as the
> following:
> 
> $a = array();
> 
> function foo(&a)

function foo(&$a)

> {
>         for ($i=0; $i < 10; i++)
>         {
>                 $a[$i] = $i;
>         }
> }
> 
> foo($a);
> echo "<PRE>";
> print_r($a);
> echo "</PRE>";
> 
> However, when I try this on my setup, it doesn't work and I get the
> following error message:
> 
> PHP Parse error:  parse error, unexpected T_STRING, expecting T_VARIABLE
> in...
> 
> Anyone have any ideas or suggestions?
> 
> Thanks,
> Jim
> 
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
DB_DataObject_FormBuilder - The database at your fingertips
http://pear.php.net/package/DB_DataObject_FormBuilder

paperCrane --Justin Patrin--

--- End Message ---
--- Begin Message ---
Thanks everyone for the help with this issue !

> > another quick one. I was wondering what you'd have to do
> > with a function, so it would be able to have 'optional' parameters
> > when calling it.
> >
> > much like:
> >
> > string substr ( string string, int start [, int length])
> >
> > where you can just omit the [, in length] part if you want.
> > What do you have to do in your own functions to allow for
> > something like that ?
> 
> <?php
> 
>     function myFunction ($argOne, $argTwo = 'defaultTwo', $argThree =
> 'defaultThree')
>     {
>         echo '$argOne: ' . $argOne . ' - ';
>         if ($argTwo == 'defaultTwo')
>             echo 'probably $argTwo was not provided - ';
>         else
>             '$argTwo : ' . $argTwo . ' - ';
>         if ($argThree == 'defaultThree')
>             echo 'probably $argThree was not provided - ';
>         else
>             '$argThree : ' . $argThree . '<br>';
>     }
> 
> myFunction ('One' , 'Two', 'Three');
> myFunction ('One' , 'Two', '');
> myFunction ('One' , '', '');
> myFunction ('' , '', '');
> 
> myFunction ('One' , 'Two');
> myFunction ('One');
> ?>
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
NEU: WLAN-Router f�r 0,- EUR* - auch f�r DSL-Wechsler!
GMX DSL = superg�nstig & kabellos http://www.gmx.net/de/go/dsl

--- End Message ---
--- Begin Message ---
Hi All

I need to give my users possibility to download files from my site
How can I realized it with the help of PHP script

<a href=myscript.php>Download my File</a>
if my file name is "mypath\myfile.ext"
What is myscript.php look like?

i.e. How to invoke download interface in user's browser

Thanks for help ...
--- End Message ---

Reply via email to