RE: [PHP-WIN] PHP on Win2000/NT in a Production Environment

From: Date: Wed, 06 Sep 2000 12:52:28 +0000
Subject: RE: [PHP-WIN] PHP on Win2000/NT in a Production Environment
Groups: php.windows 
Request: Send a blank email to php-windows+get-2459@lists.php.net to get a copy of this message
php 4.0.1 (as CGI) WinNT IIS4 I am kind of doing both. I haven't tested multiple file uploads yet... Here is the code I am testing for file upload. This is only one file at a time: FORM PAGE code <form enctype="multipart/form-data" method="post" action="do_upload.php"> <p><strong>File to Upload:</strong><br> <input type="file" name="img1" size="30"></p> <P><input type="submit" name="submit" value="Upload File"></p> END FORM PAGE CODE UPLOAD PAGE CODE // if the file is too big, don't accept it (100K) if ( $img1_size > 100000 ) { die ("The file ($img1_size bytes) is too big. I won't allow files that large to be uploaded"); } // if $img_name isn't empty, try to copy the file if ($img1_name != "") { // copy the file to a directory or //die and print an error message // NOTE! if you're on a Windows machine, // use Windows pathnames, like so: // copy("$img1", "C:\\some\\directory\\path\\$img1_name"); copy("$img1", "D:\\InetPub\\wwwroot\\is\\website\\file_upload\\$img1_name") or die("Couldn't copy the file!"); } else { // if $img_name was empty, die and let us know why die("No input file specified"); } END UPLOAD PAGE CODE I am using the following code to test a directory read: <?PHP $path = "d:InetPub\\wwwroot\\is\\website\\file_upload\\"; $handle=opendir($path); while ($file = readdir($handle)) { $flename = "$file"; echo $flename, " ", filesize($flename), "<br>"; } closedir($handle); GOOD LUCK, John --------------------- John Asendorf - jasendorf@lcounty.com Web Applications Developer http://www.lcounty.com - CHECK OUT THE NEW LOOK! Licking County, Ohio, USA 740-349-3631 > -----Original Message----- > From: Jordi Marquès Perarnau [mailto:trespi@interwatts.com] > Sent: Wednesday, September 06, 2000 5:50 AM > To: php-windows@lists.php.net > Subject: RE: [PHP-WIN] PHP on Win2000/NT in a Production Environment > > > Any body knows how upload all the files of a directory using a form? > Can I know how many files have I in a directory of a client, > and the names > of them, using Javascript. I don't have much level about javascript if > javascript can do that any body knows a short tutorial to learn this? > > Well If anyone can help me or have done it, tell me how to > start or give me > some code. > Thank you for advance! > > > > > ************************************************************** > ********* > > Jordi Marquès Perarnau > tel: 655946636 correu-e: trespi@interwatts.com > > ° > ( \/\/ ) INTERWATTS, Serveis Informàtics i Telemàtics, SL > > http://www.interwatts.com tels: 972486078 i 972208745 fax: > 972208745 > > > ----- Original Message ----- > From: Asendorf, John <JAsendorf@lcounty.com> > To: Maurice Barnes <maurice@digtechinc.com>; > <php-windows@lists.php.net> > Sent: Thursday, August 31, 2000 11:00 PM > Subject: RE: [PHP-WIN] PHP on Win2000/NT in a Production Environment > > > > Hi Maurice, > > > > We are using it for our site, www.lcounty.com > > > > granted, it's a bit small but I've only been working on it > for about a > month > > and a half... > > > > PHP, IIS, WinNT > > > > --------------------- > > John Asendorf - jasendorf@lcounty.com > > Web Applications Developer > > http://www.lcounty.com - CHECK OUT THE NEW LOOK! > > Licking County, Ohio, USA > > 740-349-3631 > > > > > > > -----Original Message----- > > > From: Maurice Barnes [mailto:maurice@digtechinc.com] > > > Sent: Thursday, August 31, 2000 3:59 PM > > > To: php-windows@lists.php.net > > > Subject: [PHP-WIN] PHP on Win2000/NT in a Production Environment > > > > > > > > > Is anyone using PHP in WiNNT with IIS in a production environment. > > > I need some URL's > > > > > > Maurice > > > > > > ----- Original Message ----- > > > From: "Derek Paterson" <derek.paterson@edinburgh.gov.uk> > > > To: <php-windows@lists.php.net> > > > Sent: Thursday, August 31, 2000 1:40 PM > > > Subject: Re: [PHP-WIN] Re: odbc_connect > > > > > > > > > > I've got this working great on PHP4.02 and NT4(SP5) - > > > remembering to use > > > > SystemDSN, but I've noticed that I can't use files that are > > > not on the > > > > webserver - eg a file on a separate Novell Netware 5 > File Server. > > > > > > > > Any reason for this? I'm short of space for copying some > > > of the bigger > > > > databases to the web server. If I used MS Client would > that help? > > > > > > > > Derek > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Gonzalo Vera" <gvz@eucalipto.net> > > > > To: "Warwick Chapman (Budgee)" <Budgee@ghs.kzn.school.za> > > > > Cc: "Giuseppe D'Ambrosio" <da_g@altavista.com>; > > > <php-windows@lists.php.net> > > > > Sent: 31 August 2000 15:32 > > > > Subject: Re: [PHP-WIN] Re: odbc_connect > > > > > > > > > > > > > > What do I use for the DSN? I have tried the dbname I > > > also tired the > > > > > > same DSN that the asp code uses (below): > > > > > > > > > > > $conn=odbc_connect("DRIVER={Microsoft Access Driver > > > > > > > (*.mdb)};DBQ=c:\inetpub\wwwroot\phpodbc\ghs.mdb","inet","inet"); > > > > > > > > > > I don't know if this works, but it certainly is cleaner > > > if you go to > > > > > ODBC configuration in the control panel and register a > > > DSN ("user" if > > > > > using Win95/98, "system" on NT/2000). Then just use that > > > name in the > > > > > odbc_connect, like: > > > > > > > > > > > > > > > > > $conn=odbc_connect("alumni","inet","inet"); > > > > > > > > > > The DSN you register in the control panel ODBC applet > > > will have all > > > > > the information needed for the connecton to be made, so > > > you only need > > > > > to specify that name. > > > > > > > > > > Gonzalo. > > > > > > > > > > > > > > > > > > > > -- > > > > > PHP Windows Mailing List (http://www.php.net/) > > > > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > > > > For additional commands, e-mail: > php-windows-help@lists.php.net > > > > > To contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > > > > > > > > > > > > > > > > > > > > > -- > > > > PHP Windows Mailing List (http://www.php.net/) > > > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > > > For additional commands, e-mail: php-windows-help@lists.php.net > > > > To contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > > > > > > > > > > > > > > > > > > > -- > > > PHP Windows Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > > For additional commands, e-mail: php-windows-help@lists.php.net > > > To contact the list administrators, e-mail: > > > php-list-admin@lists.php.net > > > > > > > -- > > PHP Windows Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > > For additional commands, e-mail: php-windows-help@lists.php.net > > To contact the list administrators, e-mail: > php-list-admin@lists.php.net > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.windows (#2459) next »