Re: [PHP] Need Idea to make Backup

2010-01-14 Thread Jens Geier
"Robert Cummings" schrieb im Newsbeitrag news:4b4f40d3.3010...@interjinn.com... > haliphax wrote: >> On Thu, Jan 14, 2010 at 5:45 AM, Ashley Sheridan >> wrote: >> >>> On Thu, 2010-01-14 at 12:32 +0100, Jens Geier wrote: >>> "Ashley Sheridan" schrieb im Newsbeitrag news:1263463572.5952.

Re: [PHP] Need Idea to make Backup

2010-01-14 Thread Jens Geier
"Ashley Sheridan" schrieb im Newsbeitrag news:1263469507.5952.75.ca...@localhost... > On Thu, 2010-01-14 at 12:32 +0100, Jens Geier wrote: > >> "Ashley Sheridan" schrieb im Newsbeitrag >> news:1263463572.5952.71.ca...@localhost... >> > On Thu, 2010-01-14 at 10:12 +0100, Jens Geier wrote: >> > >>

Re: [PHP] Need Idea to make Backup

2010-01-14 Thread Jens Geier
"haliphax" schrieb im Newsbeitrag news:952625161001140625x31d03ed5oef8216064da13...@mail.gmail.com... > On Thu, Jan 14, 2010 at 5:45 AM, Ashley Sheridan > wrote: > >> On Thu, 2010-01-14 at 12:32 +0100, Jens Geier wrote: >> >> > "Ashley Sheridan" schrieb im Newsbeitrag >> > news:1263463572.5952.7

Re: [PHP] What's the best way to extract HTML out of $var?

2010-01-14 Thread John Meyer
On 1/14/2010 7:15 PM, alexus wrote: > What's the best way to extract HTML out of $var? > > example of $var > > $var = "http://http://stackoverflow.com/"Stack Overflow" > I want > > $var2 = "http://starckoverflow.com/"; > example: preg_match(); > > what else? > Actually what it looks like you

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Jochem Maas
Op 1/14/10 11:37 PM, Kim Madsen schreef: > Ashley Sheridan wrote on 14/01/2010 23:30: > >>> What is the difference between: >>> >>> >> print "hello PHPeople"; >>> ?>WHITESPACE >>> >>> and >>> >>> >> print "hello PHPeople"; >>> WHITESPACE >>> >>> Same shit when I look at it, a sloppy developer is w

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Mattias Thorslund
Kim Madsen wrote: Mattias Thorslund wrote on 09/01/2010 02:26: A neat thing with pairing every when mixed in HTML is that these are valid XML processing instructions. If your HTML satisfies XML well-formedness, your PHP document will also be valid XML. Not that I've ever had any need to proce

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Bipper Goes!
Wait, Kim, whats your last name? On Thu, Jan 14, 2010 at 5:04 PM, Kim Madsen wrote: > Ashley Sheridan wrote on 14/01/2010 23:36: > > > What has been said on this thread a few times is it is not always a >> developer error, but a bug with the editor, which is not something that will >> be picked

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Ashley Sheridan
On Fri, 2010-01-15 at 00:04 +0100, Kim Madsen wrote: > Ashley Sheridan wrote on 14/01/2010 23:36: > > > What has been said on this thread a few times is it is not always a > > developer error, but a bug with the editor, which is not something that > > will be picked up until it occurs. > > Onc

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Kim Madsen
Ashley Sheridan wrote on 14/01/2010 23:36: What has been said on this thread a few times is it is not always a developer error, but a bug with the editor, which is not something that will be picked up until it occurs. Once again I love my VIm :-) (with whitespace highlight if needed) -- Kind

Re: [PHP] strtotime

2010-01-14 Thread John Taylor-Johnston
My thanks to all! Adam Richardson wrote: I've not read this, but if the first valid date is Jan. 1st, 1970, then passing that date back in the case of errors would lead to ambiguity. Is it a valid date or is it an error. Passing back the date of the day just before (in terms of time, I think

[PHP] Re: php/ruby drb adapter

2010-01-14 Thread Manuel Lemos
Hello, on 01/14/2010 12:51 PM Pete Yadlowsky said the following: > I'll be honest: php is not my favorite programming language. That honor > goes to ruby. And I don't mean ruby-on-rails; just straight, pure > unfettered ruby. I use ruby to write web applications and just about > everything else. >

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Ashley Sheridan
On Thu, 2010-01-14 at 23:37 +0100, Kim Madsen wrote: > Ashley Sheridan wrote on 14/01/2010 23:30: > > >> What is the difference between: > >> > >> >> print "hello PHPeople"; > >> ?>WHITESPACE > >> > >> and > >> > >> >> print "hello PHPeople"; > >> WHITESPACE > >> > >> Same shit when I look at i

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Kim Madsen
Ashley Sheridan wrote on 14/01/2010 23:30: What is the difference between: WHITESPACE and Plenty of differences, if you include the first one as a file, the whitespace gets sent to the browser because it is not part of the PHP, and so is assumed to be HTML. Once this happens, the headers

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Ashley Sheridan
On Thu, 2010-01-14 at 23:30 +0100, Kim Madsen wrote: > John Corry wrote on 12/01/2010 17:04: > > I leave ?> out. > > > > I'm pretty careful about my code formatting and whitespace. > > > > It's my opinion that if I can eliminate a potential problem by not including > > an optional closing tag...

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Kim Madsen
John Corry wrote on 12/01/2010 17:04: I leave ?> out. I'm pretty careful about my code formatting and whitespace. It's my opinion that if I can eliminate a potential problem by not including an optional closing tag...there's really no reason why I shouldn't. What is the difference between: W

Re: [PHP] POLL: To add the final ?> or not...

2010-01-14 Thread Kim Madsen
Hey Haven't had the time to read up on the maillist, but here's my input. Mattias Thorslund wrote on 09/01/2010 02:26: To my eyes, ?> means "look there is more content coming", which seems kind of silly when there isn't. To mine it means, no more PHP code for now. I don't wanna make it diff

Re: [PHP] strtotime

2010-01-14 Thread haliphax
On Thu, Jan 14, 2010 at 2:53 PM, Adam Richardson wrote: > I've not read this, but if the first valid date is Jan. 1st, 1970, then > passing that date back in the case of errors would lead to ambiguity. Is > it > a valid date or is it an error. Passing back the date of the day just > before (in t

Re: [PHP] strtotime

2010-01-14 Thread Adam Richardson
I've not read this, but if the first valid date is Jan. 1st, 1970, then passing that date back in the case of errors would lead to ambiguity. Is it a valid date or is it an error. Passing back the date of the day just before (in terms of time, I think it's the second before) the first valid date

Re: [PHP] strtotime

2010-01-14 Thread Kim Madsen
Hi guys I have a question: Ashley Sheridan wrote on 14/01/2010 19:20: MySQL uses a default "-00-00" value for date fields generally, but when converted into a timestamp, the string equates to a false value. In PHP, timestamps are numerical values indicating the seconds since Midnight of the

[PHP] Re: IDE -> SVN -> dev server -> live server

2010-01-14 Thread Nathan Rixham
John Corry wrote: > I am working on designing an documenting a process for our team to use to > manage code updates/changes. > > What we've been doing has been ghastly: a bunch of developers using > dreamweaver's 'check in/out' functions, all using the same FTP login, to FTP > files to the product

Re: [PHP] strtotime

2010-01-14 Thread Adam Richardson
When you set the date to "-00-00", you start the following sequence: 1. strtotime returns false, because "-00-00" isn't a date it can parse into a timestamp. 2. date returns 1969, because it's not passed a valid timestamp and it works from December 31, 1969 for any invalid dat

Re: [PHP] strtotime

2010-01-14 Thread Ashley Sheridan
On Thu, 2010-01-14 at 13:14 -0500, John Taylor-Johnston wrote: > Hello, > > In a mysql date() field, I set the default to "-00-00". > > Therefore, $mydata->birthday = "-00-00"; > > But when I run this next line, $then = 1969. > > $then=date("Y", strtotime($mydata->birthday)); > > Why

[PHP] strtotime

2010-01-14 Thread John Taylor-Johnston
Hello, In a mysql date() field, I set the default to "-00-00". Therefore, $mydata->birthday = "-00-00"; But when I run this next line, $then = 1969. $then=date("Y", strtotime($mydata->birthday)); Why 1969, and not 0 or nothing? If I echo strtotime("-00-00"); Nothing appears. So

Re: [PHP] IDE -> SVN -> dev server -> live server

2010-01-14 Thread vikash . iitb
I do not see the reason why you would need an absolute URL like var base_url = ' http://mysite.com' in your javascript code. If only this is giving you problems, use: *window.location.hostname* to get the hostname in javascript. --- Vikash Kumar http://vika.sh On Thu, Jan 14, 2010 at 9:40 PM, J

[PHP] IDE -> SVN -> dev server -> live server

2010-01-14 Thread John Corry
I am working on designing an documenting a process for our team to use to manage code updates/changes. What we've been doing has been ghastly: a bunch of developers using dreamweaver's 'check in/out' functions, all using the same FTP login, to FTP files to the production server. It turns out the

Re: [PHP] Need Idea to make Backup

2010-01-14 Thread Robert Cummings
haliphax wrote: On Thu, Jan 14, 2010 at 5:45 AM, Ashley Sheridan wrote: On Thu, 2010-01-14 at 12:32 +0100, Jens Geier wrote: "Ashley Sheridan" schrieb im Newsbeitrag news:1263463572.5952.71.ca...@localhost... On Thu, 2010-01-14 at 10:12 +0100, Jens Geier wrote: "Ashley Sheridan" schrieb

[PHP] php/ruby drb adapter

2010-01-14 Thread Pete Yadlowsky
Hi, I'll be honest: php is not my favorite programming language. That honor goes to ruby. And I don't mean ruby-on-rails; just straight, pure unfettered ruby. I use ruby to write web applications and just about everything else. However, there are obviously very many web applications and web

Re: [PHP] Need Idea to make Backup

2010-01-14 Thread haliphax
On Thu, Jan 14, 2010 at 5:45 AM, Ashley Sheridan wrote: > On Thu, 2010-01-14 at 12:32 +0100, Jens Geier wrote: > > > "Ashley Sheridan" schrieb im Newsbeitrag > > news:1263463572.5952.71.ca...@localhost... > > > On Thu, 2010-01-14 at 10:12 +0100, Jens Geier wrote: > > > > > >> "Ashley Sheridan" s

Re: [PHP] header("Location:...") fails

2010-01-14 Thread haliphax
On Wed, Jan 13, 2010 at 7:02 PM, Shawn McKenzie wrote: > Robert Cummings wrote: > > Just make your life easy and create a redirect() function that generates > > the header instruction, makes a relative URL into an absolute URL and > > does the exit call. Then you just need to do: > > > > redirect(

Re: [PHP] weird xml tag

2010-01-14 Thread Devendra Jadhav
Hi Ashley, Thank you very much for your help. simplexml handles namespace. here is the link for reference http://www.sitepoint.com/blogs/2005/10/20/simplexml-and-namespaces/ I am very happy. Thank you very much again. :D On Thu, Jan 14, 2010 at 6:06 PM, Ashley Sheridan wrote: > On Thu, 2010-01-1

Re: [PHP] weird xml tag

2010-01-14 Thread Ashley Sheridan
On Thu, 2010-01-14 at 18:00 +0530, Devendra Jadhav wrote: > Hi All, > > I am writing module to display recent Wordpress blog posts in drupal. > I am taking RSS feeds of blog. I am using simple xml library of PHP to parse > xml. > Now the problem is I get weird tag in XML. > Jason Bourne > when i

[PHP] weird xml tag

2010-01-14 Thread Devendra Jadhav
Hi All, I am writing module to display recent Wordpress blog posts in drupal. I am taking RSS feeds of blog. I am using simple xml library of PHP to parse xml. Now the problem is I get weird tag in XML. Jason Bourne when i convert this xml into object by using simplexml_load_string I am not gettin

Re: [PHP] Need Idea to make Backup

2010-01-14 Thread Ashley Sheridan
On Thu, 2010-01-14 at 12:32 +0100, Jens Geier wrote: > "Ashley Sheridan" schrieb im Newsbeitrag > news:1263463572.5952.71.ca...@localhost... > > On Thu, 2010-01-14 at 10:12 +0100, Jens Geier wrote: > > > >> "Ashley Sheridan" schrieb im Newsbeitrag > >> news:1263391167.5952.62.ca...@localhost...

Re: [PHP] Need Idea to make Backup

2010-01-14 Thread Jens Geier
"Ashley Sheridan" schrieb im Newsbeitrag news:1263463572.5952.71.ca...@localhost... > On Thu, 2010-01-14 at 10:12 +0100, Jens Geier wrote: > >> "Ashley Sheridan" schrieb im Newsbeitrag >> news:1263391167.5952.62.ca...@localhost... >> > On Wed, 2010-01-13 at 14:57 +0100, Jens Geier wrote: >> > >>

Re: [PHP] parse date field

2010-01-14 Thread Michael Kjeldsen
On 01/14/2010 11:01 AM, John Taylor-Johnston wrote: How do I parse a date field from mysql? I was hoping this would work: $mydata->birthday = "2007-02-13"; #What month is it? echo date("F", $mydata->birthday); #What year is it? echo date("Y", $mydata->birthday); What am I missing? All I get is

Re: [PHP] parse date field

2010-01-14 Thread John Taylor-Johnston
Super, thanks. 5:14 a.m. - My head is fogging :p vikash wrote: Use strttotime() function. This will work as intended. $mydata->birthday = strtotime("2007-02-13"); #What month is it? echo date("F", $mydata->birthday); #What year is it? echo date("Y", $mydata->birthday); On Thu, Jan 14, 2010 at

Re: [PHP] parse date field

2010-01-14 Thread Lester Caine
John Taylor-Johnston wrote: How do I parse a date field from mysql? I was hoping this would work: $mydata->birthday = "2007-02-13"; This just stores a string to the variable $mydata->birthday - where did you define $mydata->birthday as a data object? $mydata->birthday = date("2007-02-13");

Re: [PHP] Need Idea to make Backup

2010-01-14 Thread Ashley Sheridan
On Thu, 2010-01-14 at 10:12 +0100, Jens Geier wrote: > "Ashley Sheridan" schrieb im Newsbeitrag > news:1263391167.5952.62.ca...@localhost... > > On Wed, 2010-01-13 at 14:57 +0100, Jens Geier wrote: > > > >> Hello Ashley, > >> > >> yes rsync is a good idea, but does this also work if there is onl

Re: [PHP] parse date field

2010-01-14 Thread vikash . iitb
Use strttotime() function. This will work as intended. $mydata->birthday = strtotime("2007-02-13"); #What month is it? echo date("F", $mydata->birthday); #What year is it? echo date("Y", $mydata->birthday); - -- Vikash Kumar http://vika.sh On Thu, Jan 14, 2010 at 3:31 PM, John Taylor-Johnston <

[PHP] parse date field

2010-01-14 Thread John Taylor-Johnston
How do I parse a date field from mysql? I was hoping this would work: $mydata->birthday = "2007-02-13"; #What month is it? echo date("F", $mydata->birthday); #What year is it? echo date("Y", $mydata->birthday); What am I missing? All I get is December 1969. Hmmm? I am looking at the manual: ht

Re: [PHP] Need Idea to make Backup

2010-01-14 Thread Jens Geier
"Ashley Sheridan" schrieb im Newsbeitrag news:1263391167.5952.62.ca...@localhost... > On Wed, 2010-01-13 at 14:57 +0100, Jens Geier wrote: > >> Hello Ashley, >> >> yes rsync is a good idea, but does this also work if there is only a >> internet conection to may SERVER ? >> >> Kind Regards >> Jens