File Manager

From: Date: Mon, 13 Nov 2000 20:18:45 +0000
Subject: File Manager
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25024@lists.php.net to get a copy of this message
Hello, I am a PHP newbie so please be kind. Is there a way to create a file management system.... What I am looking for is a way for users to upload files to a central repository and then have a lis of all the files in the repository.... I know this is a loaded question but can you guys direct me with some hints or the proper functions I should read up on.. Thanks Phil Labonte Systems Administrator Atreus Systems (p) 613-233-1741 x243 (c) 613-277-1697 plabonte@atreus-systems.com http://www.atreus-systems.com/ -----Original Message----- From: Paul Williams [mailto:pwilliams@firstream.com] Sent: Monday, November 13, 2000 11:55 AM To: 'Brian T. Allen'; Php-General (E-mail) Subject: RE: [PHP] $string . "text" not working properly Hi Brian, Try $MESSAGE .= $IMAGE . "Only $" . ($AMOUNT - $USED) . " available.<br>\n"; it seems the text append (.) has higher priority over subtract (-) so it seems to be doing ($IMAGE . "Only $" . $AMOUNT) - $USED Putting parenthesis around the arithmetic fixes the problem. Cheers Paul -----Original Message----- From: php-general-return-24975-pwilliams=firstream.com@lists.php.net [mailto:php-general-return-24975-pwilliams=firstream.com@lists.php.net]O n Behalf Of Brian T. Allen Sent: 13 November 2000 16:49 To: Php Subject: [PHP] $string . "text" not working properly Hi *, Consider the following code, which I think should work: <? $IMAGE = "<img src=\"/images/error.gif\">"; $MESSAGE = "Message:<br>\n"; $AMOUNT = "10"; $USED = "6"; $MESSAGE .= $IMAGE . "Only $" . $AMOUNT - $USED . " available.<br>\n"; echo $MESSAGE; ?> This should output: Message:<br> <img src=\"/images/error.gif\">Only $4 available.<br> But instead it outputs: Message:<br> -6 available.<br> Notice that it drops the $IMAGE and "Only $", not to mention calculating the math incorrectly (actually, it drops $AMOUNT resulting in an accurate but unwanted "0 - 6" calculation. I have long suspected problems with the $VAR = $START . " hello world " . $END; syntax, but this is the first easily reproducible instance of it. I have used the following as a workaround, but it is of course unacceptable in the long-run: $MESSAGE .= $IMAGE; $MESSAGE .= "Only $"; $MESSAGE .= $AMOUNT - $USED; $MESSAGE .= " available.<br>\n"; Any thoughts or suggestions? Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#25024) next »