Re: [PHP] BUG - Someone else please verify B4 I file
on 4/4/01 5:14 PM, Data Driven Design at [EMAIL PROTECTED] wrote: I've noticed that and had to rewrite several scripts when hosts upgraded from PHP3 to PHP4. $HTTP_POST_VARS is considered set even when it is empty. i have also noticed this. we run 4.0.3pl1 here. have a great day andy -- *** Andrew Rush :: Lead Systems Developer :: MaineToday.com *** "A friend of the devil is a friend of mine" - R. Hunter -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Case?
on 3/29/01 12:14 PM, [EMAIL PROTECTED] splat open and thusly melted: if so where I can find them detailed in the online docs? look under switch, in control structures. -- :: Andrew Rush :: Lead Systems Developer :: MaineToday.com :: ** "Crippled but free, blind all the time, i was learning to see" - J. Garcia / R. Hunter ** The views expressed herein are not necessarily those of my employer, but they let me have them anyway. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] counting files
On Friday, February 16, 2001, at 10:31 AM, Hoover, Josh wrote: Try this bit of code and see if it works. (I don't know if there's a less taxing (on the server) way to get a count of files in a directory or not.) this code snippet won't work as a standalone. you are referencing an object that does not exist. $myDirectory = dir("yourdirectory"); while($entry=$myDirectory-read()) { $filecount++; } $myDirectory-close(); you are on the right track though. if you are sure that everything in the directory $d=opendir("path/to/my/directory"); $i=0; while($found=readdir($d)) { if($found != "." $found != "..") { $i++; } } print("there were $i files found."); :: Andrew Rush :: Lead Systems Developer :: MaineToday.com :: :** "Crippled :but free, blind all the time, i was learning to see" - J. Garcia / R. Hunter :** The :views expressed herein are not necessarily those of my employer, but they let me :have them anyway. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] MySQL COUNT Won't Work
On Friday, February 16, 2001, at 09:27 AM, Jeff Oien wrote: $result = mysql_query($sql,$connection) or die("Couldn't execute query."); //error from here you die argument is next to worthless. change it to: die("ERROR ".mysql_errno().": ".mysql_error()."pre$query/pre"); this should tell you everything you need to know about why your query failed. :: Andrew Rush :: Lead Systems Developer :: MaineToday.com :: :** "Crippled :but free, blind all the time, i was learning to see" - J. Garcia / R. Hunter :** The :views expressed herein are not necessarily those of my employer, but they let me :have them anyway. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Regex Matching
in Perl, i do thusly: $adtext = "This is a {test} john.smith\@mail.mainetoday.com"; $email = $1 if($adtext=~/(\{.*\})/); print "email = $email\n\n"; and i get back "email = "test". i then do thusly in PHP: $f=fopen($test_name, "r"); while(!feof($f)) { $line=fgets($f, 4096); preg_match_all("/(\{.*\})/", $line, $holes); } after this $holes contains the number of elements i expect to get back, but has no values. any ideas what i am doing wrong? :: Andrew Rush :: Lead Systems Developer :: MaineToday.com :: :** "Crippled :but free, blind all the time, i was learning to see" - J. Garcia / R. Hunter :** The :views expressed herein are not necessarily those of my employer, but they let me :have them anyway. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]