[PHP] READING LDIF FILES
Hey all, how can I read LDIF files using PHP?? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WebDav via PHP
I looked up the documentation and did find the same useless hint which you are referring to. No explanation. No example. ""Richard Lynch"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Did you search on php.net using "online documentation" in the popup menu? > > Did you find "WebDAV" in this page: > > http://us3.php.net/manual/en/ini.core.php > > You now know as much about this PHP/WebDAV thingie a I do... :-) > > On Sat, July 1, 2006 1:10 pm, Martin Staiger wrote: >> Dear group, >> >> Apache's WebDav-features do not fulfill our requirements concerning >> file-management since we have to manage complex access-rights to files >> by >> our own logic. HOW can we create our own WebDav-Server with PHP ? Are >> there >> any alternatives? I couldn't find any examples so far ... >> >> Thankful for any useful hint, >> Marc >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > -- > Like Music? > http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] WebDav via PHP
I looked up the documentation and did find the same useless hint which you are referring to. No explanation. No example. ""Richard Lynch"" <[EMAIL PROTECTED]> schrieb im Newsbeitrag news:[EMAIL PROTECTED] > Did you search on php.net using "online documentation" in the popup menu? > > Did you find "WebDAV" in this page: > > http://us3.php.net/manual/en/ini.core.php > > You now know as much about this PHP/WebDAV thingie a I do... :-) > > On Sat, July 1, 2006 1:10 pm, Martin Staiger wrote: >> Dear group, >> >> Apache's WebDav-features do not fulfill our requirements concerning >> file-management since we have to manage complex access-rights to files >> by >> our own logic. HOW can we create our own WebDav-Server with PHP ? Are >> there >> any alternatives? I couldn't find any examples so far ... >> >> Thankful for any useful hint, >> Marc >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> >> > > > -- > Like Music? > http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[Fwd: RE: [PHP] Quick Question re: Windows/Linux PHP]
but what would I do with my life once I 'got it'? Original Message It would be nice if you read some of my other threads regarding PHP5 before opening your mouth and saying something stupid. People like you are the reason why I don't post very often to these lists. I would rather struggle for days with it than listen to some halfwit like you who's got nothing better to do. Get a life moron. -Original Message- From: Jochem Maas [mailto:[EMAIL PROTECTED] Sent: July 1, 2006 6:41 AM To: Beauford Cc: php-general@lists.php.net Subject: Re: [PHP] Quick Question re: Windows/Linux PHP Beauford wrote: > Hi, > > I'm just curious, because I come across this from time to time. > > Why does the code below work on Windows and not on Linux. PHP is 5.0 > on Linux and 4.4 on Windows (still can't get 5 on Windows). The code > at the what stops you from installing php5 on windows? - it's not like it's very difficult. > very bottom is how I got it to work on Linux. Also, why is it with the > same ah yes good of you to point out which line(s) you changed. > setup I can't call a function within a function in Linux, but can in > Windows. Sorry I don't have the error, but something about calling a > static if your too lazy to run the code one more time to copy and paste the error then why should anyone help you? > function. Would this be a difference between OS's or with the > different versions of PHP? it's something to do with fact that OO in php4 is a world away from OO in php5. > > Thanks > > B > > --- > > if (empty($subemail)) { $form->setError($field, emailnotentered); > } > else { >$regex = "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*" >."@[a-z0-9-]+(\.[a-z0-9-]{1,})*" >."\.([a-z]{2,}){1}$"; >if(!eregi($regex,$subemail)){ > $form->setError($field, emailinvalid); >} > $subemail = stripslashes($subemail); > } > elseif(in_array(strtolower($a), $language)) $form->setError($field, > profanity); > elseif(in_array(strtolower($b), $language)) $form->setError($field, > profanity); > elseif(in_array(strtolower($c), $language)) $form->setError($field, > profanity); > else { >$query = "SELECT * FROM users WHERE $subemail = 'email'"; >$result = mysql_query($query)or $mysqlerror = mysql_error(); >if ($mysqlerror) { >$form->setError($field, tberror); >} >else { > $numrows = mysql_fetch_row($result); > if($numrows = mysql_num_rows($result)) { > $form->setError($field, duplicatepassword); > } >} > } > > --- > > $field = "email"; > list ($a, $b, $c) = split ('[EMAIL PROTECTED]', $subemail); > $regex = > "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)[EMAIL PROTECTED](\.[a-z0-9-]{1,})*\.([a-z]{2 > ,}){1} > $"; > > if (empty($subemail)) { $form->setError($field, emailnotentered); > } > elseif(!eregi($regex,$subemail)){ > $form->setError($field, emailinvalid); > } > elseif(in_array(strtolower($a), $language)) $form->setError($field, > profanity); > elseif(in_array(strtolower($b), $language)) $form->setError($field, > profanity); > elseif(in_array(strtolower($c), $language)) $form->setError($field, > profanity); > > else { >$query = "SELECT * FROM users WHERE $subemail = 'email'"; >$result = mysql_query($query)or $mysqlerror = mysql_error(); >if ($mysqlerror) { >$form->setError($field, tberror); > >} >else { > $numrows = mysql_fetch_row($result); > if($numrows = mysql_num_rows($result)) { > $form->setError($field, duplicatepassword); > } >} > } > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] READING LDIF FILES
how can I read LDIF files using PHP?? http://www.php.net/file_get_contents http://www.php.net/fopen -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] running multiple updates on a single line
--- Chris <[EMAIL PROTECTED]> wrote: > Ryan A wrote: > > Hi, > > in phpmyadmin, in the SQL part where you can write > a > > query if I have a double update such as this: > > > > > > it works without a problem as I am ending each sql > > statement with a simicolon, but in my scripts when > I > > try to run multiple updates in a single line > > > > eg: > > $xyz="update xyz set id=1 where id=0;update xyz > set > > id=3 where id=2;"; > > > > > > it does not work... any idea why? -->Chris > try a newline between the queries then phpmyadmin > will see them as > separate queries and run them properly. @Chris, Tried that... no joy. -->João > Could any of these lines cousing an error? @João, nope, I broke them down to different statements , put them into an array and ran them in a for() loop and it works perfectly... problem is, sometimes I have to run upto 15 updates at a time, would be great if I can run that in one statement. --> Robert > RTFM :) -- mysql_query() Ok, read it, again what am I missing? I took out the semicolon from the end... then I get an error. I did find one user post saying that this runs just one query at a time...but if thats the case how is PHPMyAdmin running multiple statements that are seperated by a semicolon? Thanks! Ryan -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Bitwise operators and check if an bit is NOT within the flag.
Hello there. I am working with some bitwise Operators for validating some variables. Now i need to know if an certain bit is NOT set and an other bit IS set. Example. This last example i can't seem to get to work. I Want to only do that when for example VALIDATE_CHECK3 is not within the $flag2. How can i do this? Thx in advanced. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] running multiple updates on a single line
> >>RTFM :) -- mysql_query() > > > > > > Ok, read it, again what am I missing? > > I took out the semicolon from the end... then I > get an > > error. > > I did find one user post saying that this runs > just > > one query at a time...but if thats the case how is > > PHPMyAdmin running multiple statements that are > > seperated by a semicolon? > > > because it manually splits them on the semicolon and > runs each one > trough mysql_query separately. Aha ok, then I guess me running them in a for() loop is the right way. Thanks! -- - The faulty interface lies between the chair and the keyboard. - Creativity is great, but plagiarism is faster! - Smile, everyone loves a moron. :-) __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bitwise operators and check if an bit is NOT within the flag.
Mathijs wrote: > Hello there. > > I am working with some bitwise Operators for validating some variables. > Now i need to know if an certain bit is NOT set and an other bit IS set. > > Example. > > > const VALIDATE_CHECK1 = 1; > const VALIDATE_CHECK2 = 2; > const VALIDATE_CHECK3 = 4; > const VALIDATE_ALL= 7; > > //--Example 1 - This works nice. > $flag1 = self::VALIDATE_CHECK1; > > //Do if VALIDATE_CHECK1 is set > if ($flag1 & self::VALIDATE_CHECK1) { > print 'Validate 1'; > } > //Do if VALIDATE_CHECK2 is set > if ($flag1 & self::VALIDATE_CHECK2) { > print 'Validate 2'; > } > > //--Example 2 - I want to check if VALIDATE_CHECK3 is not set and then > continue. > $flag2 = self::VALIDATE_ALL; > > //Do if VALIDATE_CHECK1 is set BUT NOT when VALIDATE_CHECK3 is set. > if ($flag2 & self::VALIDATE_CHECK1 && $flag2 & ~self::VALIDATE_CHECK3) { class Test { const VALIDATE_CHECK1 = 1; const VALIDATE_CHECK2 = 2; const VALIDATE_CHECK3 = 4; const VALIDATE_ALL= 7; static function check($flag2) { if (($flag2 & self::VALIDATE_CHECK1) && !($flag2 & self::VALIDATE_CHECK3)) print "Only Validate 1"; } } echo "First attempt: "; Test::check( Test::VALIDATE_ALL ); echo "\nSecond attempt: "; Test::check( Test::VALIDATE_CHECK1 ); echo "\n"; > print 'Only Validate 1'; > } > //etc... > ?> > > This last example i can't seem to get to work. > I Want to only do that when for example VALIDATE_CHECK3 is not within > the $flag2. > How can i do this? > > Thx in advanced. > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] running multiple updates on a single line
Ryan A wrote: --- Chris <[EMAIL PROTECTED]> wrote: Ryan A wrote: Hi, in phpmyadmin, in the SQL part where you can write a query if I have a double update such as this: it works without a problem as I am ending each sql statement with a simicolon, but in my scripts when I try to run multiple updates in a single line eg: $xyz="update xyz set id=1 where id=0;update xyz set id=3 where id=2;"; it does not work... any idea why? -->Chris try a newline between the queries then phpmyadmin will see them as separate queries and run them properly. @Chris, Tried that... no joy. -->João Could any of these lines cousing an error? @João, nope, I broke them down to different statements , put them into an array and ran them in a for() loop and it works perfectly... problem is, sometimes I have to run upto 15 updates at a time, would be great if I can run that in one statement. --> Robert RTFM :) -- mysql_query() Ok, read it, again what am I missing? I took out the semicolon from the end... then I get an error. I did find one user post saying that this runs just one query at a time...but if thats the case how is PHPMyAdmin running multiple statements that are seperated by a semicolon? Thanks! Ryan because it manually splits them on the semicolon and runs each one trough mysql_query separately. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bitwise operators and check if an bit is NOT within theflag.
Jochem Maas wrote: Mathijs wrote: Hello there. I am working with some bitwise Operators for validating some variables. Now i need to know if an certain bit is NOT set and an other bit IS set. Example. class Test { const VALIDATE_CHECK1 = 1; const VALIDATE_CHECK2 = 2; const VALIDATE_CHECK3 = 4; const VALIDATE_ALL= 7; static function check($flag2) { if (($flag2 & self::VALIDATE_CHECK1) && !($flag2 & self::VALIDATE_CHECK3)) print "Only Validate 1"; } } echo "First attempt: "; Test::check( Test::VALIDATE_ALL ); echo "\nSecond attempt: "; Test::check( Test::VALIDATE_CHECK1 ); echo "\n"; print 'Only Validate 1'; } //etc... ?> This last example i can't seem to get to work. I Want to only do that when for example VALIDATE_CHECK3 is not within the $flag2. How can i do this? Thx in advanced. Thank you very much. This seems to work :). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bitwise operators and check if an bit is NOT within theflag.
Mathijs wrote: > Jochem Maas wrote: >> Mathijs wrote: ... >>> > > > Thank you very much. > This seems to work :). cool. heres's a couple of funcs that might help you to understand bitwise operations better: >= 1) { $x++; } return $i ? $j <<= $x: 0; } /* doesn't break when exponents are near the wordsize * of the machine as the native xor does, here is some example code to * illustrate: php -r ' // include function definition here $x = 3851235679; $y = 43814; echo "\nThis is the value we want"; echo "\n3851262585"; echo "\nThe result of a native xor operation on integer values is treated as a signed integer"; echo "\n".($x ^ $y); echo "\nWe therefore perform the MSB separately"; echo "\n".get_xor32($x, $y)."\n"; ' */ function get_xor32(/*int*/ $a, /*int*/ $b) { $a1 = $a & 0x7FFF; $a2 = $a & 0x; $a3 = $a & 0x8000; $b1 = $b & 0x7FFF; $b2 = $b & 0x; $b3 = $b & 0x8000; $c = ($a3 != $b3) ? 0x8000 : 0; return (($a1 ^ $b1) |($a2 ^ $b2)) + $c; } function get_bit_str($var, $safety = 0) { $rtn = ''; $var = intval($var); if ($var < 0) { $var = 0 - $var; } while ($var != 0 /*&& $safety < 31*/) { $rtn .= ($var & 1); $var >>= 1; $safety++; } return $rtn; } > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bitwise operators and check if an bit is NOT within theflag.
Jochem Maas wrote: Mathijs wrote: Jochem Maas wrote: Mathijs wrote: ... Thank you very much. This seems to work :). cool. heres's a couple of funcs that might help you to understand bitwise operations better: >= 1) { $x++; } return $i ? $j <<= $x: 0; } /* doesn't break when exponents are near the wordsize * of the machine as the native xor does, here is some example code to * illustrate: php -r ' // include function definition here $x = 3851235679; $y = 43814; echo "\nThis is the value we want"; echo "\n3851262585"; echo "\nThe result of a native xor operation on integer values is treated as a signed integer"; echo "\n".($x ^ $y); echo "\nWe therefore perform the MSB separately"; echo "\n".get_xor32($x, $y)."\n"; ' */ function get_xor32(/*int*/ $a, /*int*/ $b) { $a1 = $a & 0x7FFF; $a2 = $a & 0x; $a3 = $a & 0x8000; $b1 = $b & 0x7FFF; $b2 = $b & 0x; $b3 = $b & 0x8000; $c = ($a3 != $b3) ? 0x8000 : 0; return (($a1 ^ $b1) |($a2 ^ $b2)) + $c; } function get_bit_str($var, $safety = 0) { $rtn = ''; $var = intval($var); if ($var < 0) { $var = 0 - $var; } while ($var != 0 /*&& $safety < 31*/) { $rtn .= ($var & 1); $var >>= 1; $safety++; } return $rtn; } Thx alot :). It will sure help me understanding it better :). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bitwise operators and check if an bit is NOT within theflag.
Jochem Maas wrote: Mathijs wrote: Jochem Maas wrote: Mathijs wrote: ... Thank you very much. This seems to work :). cool. heres's a couple of funcs that might help you to understand bitwise operations better: >= 1) { $x++; } return $i ? $j <<= $x: 0; } /* doesn't break when exponents are near the wordsize * of the machine as the native xor does, here is some example code to * illustrate: php -r ' // include function definition here $x = 3851235679; $y = 43814; echo "\nThis is the value we want"; echo "\n3851262585"; echo "\nThe result of a native xor operation on integer values is treated as a signed integer"; echo "\n".($x ^ $y); echo "\nWe therefore perform the MSB separately"; echo "\n".get_xor32($x, $y)."\n"; ' */ function get_xor32(/*int*/ $a, /*int*/ $b) { $a1 = $a & 0x7FFF; $a2 = $a & 0x; $a3 = $a & 0x8000; $b1 = $b & 0x7FFF; $b2 = $b & 0x; $b3 = $b & 0x8000; $c = ($a3 != $b3) ? 0x8000 : 0; return (($a1 ^ $b1) |($a2 ^ $b2)) + $c; } function get_bit_str($var, $safety = 0) { $rtn = ''; $var = intval($var); if ($var < 0) { $var = 0 - $var; } while ($var != 0 /*&& $safety < 31*/) { $rtn .= ($var & 1); $var >>= 1; $safety++; } return $rtn; } Thx alot :). It will sure help me understanding it better :). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bitwise operators and check if an bit is NOT within theflag.
Jochem Maas wrote: Mathijs wrote: Jochem Maas wrote: Mathijs wrote: ... Thank you very much. This seems to work :). cool. heres's a couple of funcs that might help you to understand bitwise operations better: >= 1) { $x++; } return $i ? $j <<= $x: 0; } /* doesn't break when exponents are near the wordsize * of the machine as the native xor does, here is some example code to * illustrate: php -r ' // include function definition here $x = 3851235679; $y = 43814; echo "\nThis is the value we want"; echo "\n3851262585"; echo "\nThe result of a native xor operation on integer values is treated as a signed integer"; echo "\n".($x ^ $y); echo "\nWe therefore perform the MSB separately"; echo "\n".get_xor32($x, $y)."\n"; ' */ function get_xor32(/*int*/ $a, /*int*/ $b) { $a1 = $a & 0x7FFF; $a2 = $a & 0x; $a3 = $a & 0x8000; $b1 = $b & 0x7FFF; $b2 = $b & 0x; $b3 = $b & 0x8000; $c = ($a3 != $b3) ? 0x8000 : 0; return (($a1 ^ $b1) |($a2 ^ $b2)) + $c; } function get_bit_str($var, $safety = 0) { $rtn = ''; $var = intval($var); if ($var < 0) { $var = 0 - $var; } while ($var != 0 /*&& $safety < 31*/) { $rtn .= ($var & 1); $var >>= 1; $safety++; } return $rtn; } Thx alot :). It will sure help me understanding it better :). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Bitwise operators and check if an bit is NOT within theflag.
Jochem Maas wrote: Mathijs wrote: Jochem Maas wrote: Mathijs wrote: ... Thank you very much. This seems to work :). cool. heres's a couple of funcs that might help you to understand bitwise operations better: >= 1) { $x++; } return $i ? $j <<= $x: 0; } /* doesn't break when exponents are near the wordsize * of the machine as the native xor does, here is some example code to * illustrate: php -r ' // include function definition here $x = 3851235679; $y = 43814; echo "\nThis is the value we want"; echo "\n3851262585"; echo "\nThe result of a native xor operation on integer values is treated as a signed integer"; echo "\n".($x ^ $y); echo "\nWe therefore perform the MSB separately"; echo "\n".get_xor32($x, $y)."\n"; ' */ function get_xor32(/*int*/ $a, /*int*/ $b) { $a1 = $a & 0x7FFF; $a2 = $a & 0x; $a3 = $a & 0x8000; $b1 = $b & 0x7FFF; $b2 = $b & 0x; $b3 = $b & 0x8000; $c = ($a3 != $b3) ? 0x8000 : 0; return (($a1 ^ $b1) |($a2 ^ $b2)) + $c; } function get_bit_str($var, $safety = 0) { $rtn = ''; $var = intval($var); if ($var < 0) { $var = 0 - $var; } while ($var != 0 /*&& $safety < 31*/) { $rtn .= ($var & 1); $var >>= 1; $safety++; } return $rtn; } Thx alot :). It will sure help me understanding it better :). -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Templates, PHP Frameworks, and DB Abstraction?
Hello, on 07/03/2006 03:38 AM Lester Caine said the following: >>> I'd like to get some feedback on what the list thinks is a good template >>> engine other than smarty. >>> >>> I'd also like to do some quick prototyping using a PHP framework does >>> anyone >>> have any recommendations for one that is easy to pick up and run with? >>> >>> Finally, does anyone have any suggestions for a good PHP database >>> abstraction library? >> >> You may want to take a look at this post for a few recommendations: >> >> http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html > > That is a nice sales pitch Manuel but takes bit of digesting. If you were looking for specific recommendations, they are at the end of the post. Anyway, the post was more to say that there is no consense regarding what is the recommended framework for PHP. Most people end up picking components for different purposes from different sources because different developers have developed the best packages for their own purposes. -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Templates, PHP Frameworks, and DB Abstraction?
Hello, on 07/03/2006 05:22 PM Jay Paulson said the following: I'd like to get some feedback on what the list thinks is a good template engine other than smarty. I'd also like to do some quick prototyping using a PHP framework does anyone have any recommendations for one that is easy to pick up and run with? Finally, does anyone have any suggestions for a good PHP database abstraction library? >>> You may want to take a look at this post for a few recommendations: >>> >>> http://www.phpclasses.org/blog/post/52-Recommended-PHP-frameworks.html >> That is a nice sales pitch Manuel but takes bit of digesting. >> >> Jay - This is a 'how long is a piece of string' type question. So there >> are as many answers as there are developers here ;) >> >> I've only ever used Smarty - and not seen anything yet to replace it. >> >> PDO is being pushed as a DB Abstraction library, but it only 'abstracts' >> the calls to PHP, it does nothing to abstract the SQL if you want a >> truly generic solution, if you need one, but if you don't then why >> bother with abstraction ;) > > Thinking about this paragraph above makes me wonder if with that way of > looking at it would one need a template engine? For example, why not just > separate the business logic and the HTML as much as possible and then only > imbed PHP in HTML to display the variables ()?? Then at the end > of your PHP code that does all the logic just have include() calls to the > .php files you want to parse and pass all the variables you got with your > business logic above the include calls? Hm. Just a thought. You think like that because you work alone or with other PHP developers. The truth is that good PHP developers are often not good Web (page) designers, and good Web designers are not good developers. Therefore it makes sense to split the Web page design work from PHP programming work. Smarty templates are easier to learn by Web designers than PHP. They do not need to know PHP. Furthermore, it is not a good idea to leave Web designers that does not know PHP very well to write PHP code as they may write insecure code and you will have to double the work by auditing the PHP based templates. -- Regards, Manuel Lemos Metastorage - Data object relational mapping layer generator http://www.metastorage.net/ PHP Classes - Free ready to use OOP components written in PHP http://www.phpclasses.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What's the regex for this...?
I have the source of a web page stored in $here and I want to set $this to whatever appears between '' and 'span>'. Example: $here contains (amid tons of other stuff): class="myclass">This is a statement. I want to set $this to "This is a statement." Seems simple but I'm banging my head against a wall and can't figure out how to do it... can anyone help out a dude on the 4th of July?? :) :) - Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What's the regex for this...?
At 04:50 PM 7/4/2006, Brian Dunning wrote: I have the source of a web page stored in $here and I want to set $this to whatever appears between '' and 'span>'. Example: $here contains (amid tons of other stuff): This is a statement. If you can depend on the markup you provided, you can use: $this = preg_replace("/<[^>]+>/", "", $here); to replace any with nothing. The regular expression /<[^>]+>/ parses to <{one or more characters that aren't >}> Paul -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] What's the regex for this...?
Brian Dunning wrote: I have the source of a web page stored in $here and I want to set $this to whatever appears between '' and ''. Example: $here contains (amid tons of other stuff): This is a statement. I want to set $this to "This is a statement." What code do you have so far? if it's strictly between those tags, this should work: preg_match_all('%(.*?)%isU', $text, $matches); $matches[1] will be an array with all matches. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] uploading and extracting zip files
Greetings All, Can someone please point me to a tutorial or open source 'library' that will explain how one can upload a .zip file and then extract it's contents and store this on the server and/or database using PHP. Basically the same way as one can upload and install components etc. with Joomla. Thanks! -- Kind Regards Schalk Neethling Web Developer.Designer.Programmer.President Volume4.Business.Solution.Developers -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading and extracting zip files
Schalk wrote: Greetings All, Can someone please point me to a tutorial or open source 'library' that will explain how one can upload a .zip file and then extract it's contents and store this on the server and/or database using PHP. This will unzip a file: http://pear.php.net/package/Archive_Zip As for uploading, you'll need something else for that (I don't think there's something to do it *all* for you but I could be wrong). -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Templates, PHP Frameworks, and DB Abstraction?
On Tue, 2006-07-04 at 18:54 -0300, Manuel Lemos wrote: > The truth is that good PHP developers are often not good Web (page) > designers, and good Web designers are not good developers. Yes, I agree with this completely! I am a relatively decent developer, but ask me to design an interface and you make a blabbering idiot of me... In our framework, Chisimba (Framework in a bunch of African languages), we completely separate the logic components from the templates and view (MVC). The nice thing about working in this way is that all of our code is modular as well as OO, so that if I write an object it can be re-used, as well as form only a small part of a module. This means that it is possible to get multiple developers and designers all working simultaneously on a single module to get it done really quickly. Also, to take your original topic a little further, we not only abstract database calls, but also everything else. For example, in an e-learning context we call our Content system a course, in a CMS implementation a Content Area, and in a groupware implementation a Work Area. This in multiple languages makes for a highly configurable set up! Keep all of that in mind when designing your app, as it caters for the widest possible audience, as well as the project contributing significantly to other projects. (Our project has contributed around 15 or so classes to phpclasses.org, bugfixes and feature requests to a couple of pear projects, amongst others). --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/uwc2006/content/mail_disclaimer/index.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Printing in php
weetat wrote: Hi all , I am using PHP 4.3.2 and MYSQL . I need to do printing function in php . Basically , in my client web page , it will display the list of items on the html page. And i have a print button , so that the user can print the html page to their local printer. Any way how to do this in PHP ? Thanks alternate method - CSS media print. -- life is a game... so have fun. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading and extracting zip files
Chris a écrit : Schalk wrote: Greetings All, Can someone please point me to a tutorial or open source 'library' that will explain how one can upload a .zip file and then extract it's contents and store this on the server and/or database using PHP. This will unzip a file: http://pear.php.net/package/Archive_Zip As for uploading, you'll need something else for that (I don't think there's something to do it *all* for you but I could be wrong). move_uploaded_file perhaps ? http://www.php.net/manual/en/function.move-uploaded-file.php N F -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] uploading and extracting zip files
nicolas figaro wrote: Chris a écrit : Schalk wrote: Greetings All, Can someone please point me to a tutorial or open source 'library' that will explain how one can upload a .zip file and then extract it's contents and store this on the server and/or database using PHP. This will unzip a file: http://pear.php.net/package/Archive_Zip As for uploading, you'll need something else for that (I don't think there's something to do it *all* for you but I could be wrong). move_uploaded_file perhaps ? http://www.php.net/manual/en/function.move-uploaded-file.php That will definitely do it, I think the OP wanted something already built to do everything for him with no work. -- Postgresql & php tutorials http://www.designmagick.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php