Ron Piggott wrote:
Is there an easy way to calculate the number of days between two dates?
Example: 2008-02-27 - 2007-12-03 = 86 days
The dates will be in the format above -MM-DD
Ron
This should do the trick
http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Is there an easy way to calculate the number of days between two dates?
Example: 2008-02-27 - 2007-12-03 = 86 days
The dates will be in the format above -MM-DD
Ron
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Friday 29 February 2008 11:58:16 Daniel Brown wrote:
> Get a new host that knows how to administer a web server. PHP 4.3
> was released 27 December, 2002, with the latest from the 4.3 branch
> (4.3.11) being released 31 March, 2005. The CHANGELOG should give you
> an idea of how *horrible*
I'm completely new to php and I'm trying to setup an online trouble ticket
system. After the user logs in and submits the ticket, they're supposed to
receive an email confirmation with the ticket number. I have my Exchange
server setup on another server in the same domain that I'm trying to use t
On Sat, 2008-03-01 at 01:50 +, Nathan Rixham wrote:
> I think that I may be correct in saying that google blog search uses /
> is made in PHP [which I never realised]
>
> try googling for site:blogsearch.google.com you should get back a page
> with an all revealing PHPSESSID
>
> am I specu
I think that I may be correct in saying that google blog search uses /
is made in PHP [which I never realised]
try googling for site:blogsearch.google.com you should get back a page
with an all revealing PHPSESSID
am I speculating?
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
Dani Castaños wrote:
Hi all!
I'm looking for some piece of code or class which giving a phone number
it returns me from wich country is this phone.
Do you know where I can find something like this?
Thank you in advanced!
As a little project, I took the link provided by "the other" Rob and
Jochem Maas skrev:
Jochem Maas schreef:
have you tried a test script (file encoded as UTF8) where you
hardcode the
title string and see if that also outputs 'squares' ... at least that
way
you can be sure whether the problem is in some kind of encoding mush
that occurs
during the title's round
Jochem Maas skrev:
I guess I skimmed somewhat too ... but I based my assumption on the
following from the
OPs post:
/index.php/slides/upload:
$title = htmlentities($_POST['title'], ENT_COMPAT, 'UTF-8');
$image =
'/index.php/slides/preview?title='.urlencode($title).'&content='.urlencode($_POST
Frank Arensmeier skrev:
29 feb 2008 kl. 03.41 skrev David Sveningsson:
Nathan Rixham skrev:
before going any further, your HTML page is in UTF-8 yes? with the
appropriate content-type line.
Yes, apache uses only utf-8 as charset and the html content-type meta
tag is set to utf-8 too. Also,
Zoltán Németh wrote:
2008. 02. 29, péntek keltezéssel 14.28-kor tedd ezt írta:
At 4:36 PM +0100 2/29/08, Zoltán Németh wrote:
sure, all information belonging to an object is usually in a record of a
db.
but, you mean include('user_functions.php') automatically loads that
data? based on what? a
There used to be a PHP setup parameter that controlled the expiration of the
session cookie on the browser, and I have on occasion set that up to live
well beyond closing the browser (which opened a couple more of Pandora's
boxes, when I had multiple browsers pointing to the site, but you should be
2008. 02. 29, péntek keltezéssel 14.28-kor tedd ezt írta:
> At 4:36 PM +0100 2/29/08, Zoltán Németh wrote:
> >sure, all information belonging to an object is usually in a record of a
> >db.
> >but, you mean include('user_functions.php') automatically loads that
> >data? based on what? a global $use
Ray Hauge <[EMAIL PROTECTED]> wrote:
> Wolf wrote:
> > Ray Hauge <[EMAIL PROTECTED]> wrote:
> >> Wolf wrote:
> >>> I'm curling a site to process some data, all well and good but the
> >>> results are baffling...
> >>>
> >>> $result = curl_exec($ch);
> >>> curl_close($ch);
> >>> echo "
Wolf wrote:
Ray Hauge <[EMAIL PROTECTED]> wrote:
Wolf wrote:
I'm curling a site to process some data, all well and good but the results are
baffling...
$result = curl_exec($ch);
curl_close($ch);
echo "".gettype ($result);
Of course that's not all the code, but the results contain:
-
Ray Hauge <[EMAIL PROTECTED]> wrote:
> Wolf wrote:
> > I'm curling a site to process some data, all well and good but the results
> > are baffling...
> >
> > $result = curl_exec($ch);
> > curl_close($ch);
> > echo "".gettype ($result);
> >
> > Of course that's not all the code, but the re
Wolf wrote:
I'm curling a site to process some data, all well and good but the results are
baffling...
$result = curl_exec($ch);
curl_close($ch);
echo "".gettype ($result);
Of course that's not all the code, but the results contain:
-
0 11
0 1
1 1
1 11
5 An Error Has Occurred During Pr
On 2/29/08, Alain Roger <[EMAIL PROTECTED]> wrote:
> Text is cut off based on (numbers of words, number of characters,..) ?
> what is the algorithm for such thing ?
Mr. Heyes more or less prompted me to go dig for my other, slightly
heavier version, that doesn't chop words up:
function breakU
I'm curling a site to process some data, all well and good but the results are
baffling...
$result = curl_exec($ch);
curl_close($ch);
echo "".gettype ($result);
Of course that's not all the code, but the results contain:
-
0 11
0 1
1 1
1 11
5 An Error Has Occurred During Processing.
Erro
On 2/29/08, Jean-Christophe Roux <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am running php 5.1.6 on a Centos 5.0 box (installed with yum). My php app
> uses pdo_sqlite. The issue is that I am going to have to use a special
> version of sqlite with some custom functions. How do I control which ver
On 2/29/08, Alain Roger <[EMAIL PROTECTED]> wrote:
> Hi,
>
> since a long time now, i see that some paragraphs of text are cut off and
> the additional text is replaced by 3 dots.
> e.g:
>
> "this is the original long text but without any sense and also stupid"
>
> effect desired :
> "this is
Posting Summary for PHP-General List
Week Ending: Friday, 29 February, 2008
Messages| Bytes | Sender
++--
860 (100%) 1227516 (100%) EVERYONE
123(14.3%
Hello,
I am running php 5.1.6 on a Centos 5.0 box (installed with yum). My php app
uses pdo_sqlite. The issue is that I am going to have to use a special version
of sqlite with some custom functions. How do I control which version of sqlite,
php is calling?
Thanks for any advice
tedd schreef:
At 4:36 PM +0100 2/29/08, Zoltán Németh wrote:
...
I don't like the tone here -- it appears that because I'm not agreeing
with you that my code is limited or of poor design -- because let me
assure you it's not!
So, let's just drop this -- you have your way and I have mine.
Hi,
since a long time now, i see that some paragraphs of text are cut off and
the additional text is replaced by 3 dots.
e.g:
"this is the original long text but without any sense and also stupid"
effect desired :
"this is the original long text..."
this is usually used for title articles or so
Daniel Brown wrote:
On Thu, Feb 28, 2008 at 11:08 PM, Emiliano Boragina
<[EMAIL PROTECTED]> wrote:
When I try the php the echo "no picture =("; is there. How can I do to don't
appears the message before I upload de picture.
Here's your code, re-written.
First, the op should use is_upl
On Fri, Feb 29, 2008 at 3:42 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> have you considered installing a local copy of php (and suitable webserver)
> so you can test it there?
Always good advice. At the very least, a remote dev box on which
to work the code. However, it's not going to be
On Fri, Feb 29, 2008 at 3:30 PM, Jim Lucas <[EMAIL PROTECTED]> wrote:
> First, the op should use is_uploaded_file() to check and make sure that it
> is a
> file that was infact uploaded.
> http://us3.php.net/manual/en/function.is-uploaded-file.php
>
> Secondly, the op should use move_up
Richard S. Crawford schreef:
Thanks to everyone for the suggestions. Unfortunately, I'm up against a
couple of major hurdles:
1. My host does not allow command line access and has disabled shell
execution of PHP;
2. Error reporting has been turned off and I can't seem to turn that on
with in
On Thu, Feb 28, 2008 at 8:29 PM, Warren Vail <[EMAIL PROTECTED]> wrote:
> Actually garbage cleanup can be controlled by writing your session handler
> functions. You can almost guarantee that noone else will step on your
> session (with the possible session of the user who hopes to benefit from
I finally solved the problem, after ditching the /b argument in
preg_replace It seems that Hebrew letters are not part of a word, so
far as /b is concerned. Here is the code for converting Hebrew final
letters in the middle of a word to normal letters, if anyone ever
needs it:
$text="עברית מבולגנת
On Fri, Feb 29, 2008 at 2:32 PM, Richard S. Crawford
<[EMAIL PROTECTED]> wrote:
> Thanks to everyone for the suggestions. Unfortunately, I'm up against a
> couple of major hurdles:
Not to be a smartass with my responses here
> 1. My host does not allow command line access and has disabl
1. My host does not allow command line access and has disabled shell
execution of PHP;
2. Error reporting has been turned off and I can't seem to turn that on
with ini_set or error_reporting (which is fun when I have minor syntax
errors to fix); and
3. My host is also stuck in PHP 4.3, so the
On Thu, Feb 28, 2008 at 11:08 PM, Emiliano Boragina
<[EMAIL PROTECTED]> wrote:
> When I try the php the echo "no picture =("; is there. How can I do to don't
> appears the message before I upload de picture.
Here's your code, re-written.
--
Daniel P. Brown
Senior Unix Geek
Emiliano Boragina wrote:
> Hi list…
>
> All this in the same php:
>
>
>
>
> $folder = 'pictures;
>
> $load = copy($_FILES['file']['tmp_name'] , $folder . '/' . $_FILES
> ['file']['name']);
>
> if ( $load ) {
>
>echo "Picture upload!";
>
>
Thanks to everyone for the suggestions. Unfortunately, I'm up against a
couple of major hurdles:
1. My host does not allow command line access and has disabled shell
execution of PHP;
2. Error reporting has been turned off and I can't seem to turn that on
with ini_set or error_reporting (which
De: Daniel Brown [mailto:[EMAIL PROTECTED]
On Thu, Feb 28, 2008 at 9:58 PM, Richard S. Crawford
<[EMAIL PROTECTED]> wrote:
> I'm trying to figure out a way to make sure an included PHP file has
> no syntax errors before actually including it as a part of project.
> Is this even possible? I'
At 4:36 PM +0100 2/29/08, Zoltán Németh wrote:
sure, all information belonging to an object is usually in a record of a
db.
but, you mean include('user_functions.php') automatically loads that
data? based on what? a global $user_id variable? if so, I would consider
that poor design...
Whoa ther
Nathan Rixham wrote:
> Nathan Nobbe wrote:
>> On Thu, Feb 28, 2008 at 6:14 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote:
>>
>>> if I show you guys how to do this:
>>>
>>> echo sillyFunc()['a'] . PHP_EOL;
>>>
>>> using a few brackets and things do you promise not to laugh?
>>> *it's a bit weird*
>>
>
On Thu, Feb 28, 2008 at 9:58 PM, Richard S. Crawford
<[EMAIL PROTECTED]> wrote:
> I'm trying to figure out a way to make sure an included PHP file has no syntax
> errors before actually including it as a part of project. Is this even
> possible? I'm running into brick walls.
As far as I kno
On Fri, Feb 29, 2008 at 1:31 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> (my guess would be you could rely on all systems that have said TTF file
> to support the same chars - I assume that although it may be compiled
> diffferently
> for different platforms the source font definition is going
Daniel Brown schreef:
On Fri, Feb 29, 2008 at 12:59 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
it does because he's passing the title as an argument to the image script:
I would say that's what I get for skimming, but look here:
I guess I skimmed somewhat too ... but I based my assumpti
On Fri, Feb 29, 2008 at 12:59 PM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> it does because he's passing the title as an argument to the image script:
I would say that's what I get for skimming, but look here:
>
The form accepts (expects) UTF-8 (though the OP may be better with
`latin1
Jochem Maas schreef:
David Sveningsson schreef:
Hi, I've ran into some problems when outputing text to an image using
imagettftext. I cannot get swedish characters to work, I just get a
square. I've tried different fonts which I know has those characters
(bitstream vera, arial, times new roman
On Fri, Feb 29, 2008 at 5:22 AM, Shelley <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> What's the command to use if I want to remove all the directories and
> files except 'a.gz' under a directory?
There isn't a "command" in PHP to do this. You'd have to write a
script to handle that processing.
Daniel Brown schreef:
On Thu, Feb 28, 2008 at 9:17 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote:
before going any further, your HTML page is in UTF-8 yes? with the
appropriate content-type line.
That wouldn't matter, Nate. It's an image (and already rendered
as a static graphical object)
David Sveningsson schreef:
Hi, I've ran into some problems when outputing text to an image using
imagettftext. I cannot get swedish characters to work, I just get a
square. I've tried different fonts which I know has those characters
(bitstream vera, arial, times new roman, etc). What am I doin
On Thu, Feb 28, 2008 at 8:45 PM, David Sveningsson <[EMAIL PROTECTED]> wrote:
> Hi, I've ran into some problems when outputing text to an image using
> imagettftext. I cannot get swedish characters to work, I just get a
> square. I've tried different fonts which I know has those characters
> (bi
On Thu, Feb 28, 2008 at 9:17 PM, Nathan Rixham <[EMAIL PROTECTED]> wrote:
> before going any further, your HTML page is in UTF-8 yes? with the
> appropriate content-type line.
That wouldn't matter, Nate. It's an image (and already rendered
as a static graphical object). Page encoding won't
On Fri, Feb 29, 2008 at 8:43 AM, Ray Hauge <[EMAIL PROTECTED]> wrote:
> Yeah, it is a gmail thing. They archive the message you send, so if you
> were using the gmail client, you'd see your response. The FAQs say that
> it'll send your message through IMAP/POP if someone replies to your
> mes
On Fri, Feb 29, 2008 at 5:02 AM, Dani Castaños
<[EMAIL PROTECTED]> wrote:
> Hi all!
>
> I'm looking for some piece of code or class which giving a phone number
> it returns me from wich country is this phone.
> Do you know where I can find something like this?
Most likely you'll need a data
Greg Donald schreef:
On 2/28/08, Casey <[EMAIL PROTECTED]> wrote:
#!/usr/bin/php
Or the entirely more portable version:
#!/usr/bin/env php
thanks for the tip :-)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, 2008-02-29 at 05:17 -0500, Andrés Robinet wrote:
> > -Original Message-
> > From: Dani Castaños [mailto:[EMAIL PROTECTED]
> > Sent: Friday, February 29, 2008 5:03 AM
> > To: PHP LIST
> > Subject: [PHP] Get country from Phone number
> >
> > Hi all!
> >
> > I'm looking for some pie
On Feb 29, 2008, at 10:44 AM, Daniel Brown wrote:
On Fri, Feb 29, 2008 at 10:29 AM, Andrew Ballard
<[EMAIL PROTECTED]> wrote:
On Fri, Feb 29, 2008 at 10:21 AM, Jason Pruim <[EMAIL PROTECTED]>
wrote:
.red {
color: red;
}
Let's just get all purist and go back to the c
On 2/28/08, Casey <[EMAIL PROTECTED]> wrote:
> #!/usr/bin/php
Or the entirely more portable version:
#!/usr/bin/env php
http://destiney.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Fri, Feb 29, 2008 at 10:29 AM, Andrew Ballard <[EMAIL PROTECTED]> wrote:
> On Fri, Feb 29, 2008 at 10:21 AM, Jason Pruim <[EMAIL PROTECTED]> wrote:
> >
> > .red {
> > color: red;
> > }
> >
>
> Let's just get all purist and go back to the class="highlight" so we
2008. 02. 29, péntek keltezéssel 10.12-kor tedd ezt írta:
> At 8:52 AM +0100 2/29/08, Zoltán Németh wrote:
> >it's not just that, it's also a different way of thinking about your
> >data. for example say you have a 'user' - you always have one of that ;)
> >in procedural code you would store the pr
On Fri, Feb 29, 2008 at 10:21 AM, Jason Pruim <[EMAIL PROTECTED]> wrote:
>
> On Feb 29, 2008, at 10:07 AM, Richard Heyes wrote:
>
> >>> echo
> >>> "".$myrow["char_name"]."".$myrow["char_level"]."".
> >>> $class["class"]."".$myrow["kara"]."".
> >>> $myrow["karateam"]."".$myrow["karasub"];
> >>
On Feb 29, 2008, at 10:07 AM, Richard Heyes wrote:
echo
"".$myrow["char_name"]."".$myrow["char_level"]."".
$class["class"]."".$myrow["kara"]."".
$myrow["karateam"]."".$myrow["karasub"];
Either CSS styling or the dreaded HTML "".$myrow['char_name']."" tags.
But you should use CSS:
echo
At 8:52 AM +0100 2/29/08, Zoltán Németh wrote:
it's not just that, it's also a different way of thinking about your
data. for example say you have a 'user' - you always have one of that ;)
in procedural code you would store the properties of the user in an
array or whatever, and have an include f
echo
"".$myrow["char_name"]."".$myrow["char_level"]."".$class["class"]."".$myrow["kara"]."".$myrow["karateam"]."".$myrow["karasub"];
Either CSS styling or the dreaded HTML "".$myrow['char_name']."" tags.
But you should use CSS:
echo '' ...
--
Richard Heyes
Employ me:
http://www.phpgu
On Thu, Feb 28, 2008 at 11:03 PM, Jeff <[EMAIL PROTECTED]> wrote:
> Please, can anyone tell me how to produce colored text? For instance if I
> wanted to following code to be printed as red text what would I need to add
> to they code? Thanks in advance.
>
> echo
>
> "".$myrow["char_name"]."".
On Fri, Feb 29, 2008 at 7:44 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> Daniel Brown schreef:
> > On Thu, Feb 28, 2008 at 5:06 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
> >> huh? what about debug_backtrace() ... contains plenty of info, including
> >> function names of everything in the stac
Zoltán Németh wrote:
2008. 02. 28, csütörtök keltezéssel 10.38-kor Nathan Nobbe ezt írta:
On Thu, Feb 28, 2008 at 10:35 AM, David Giragosian <[EMAIL PROTECTED]>
wrote:
On 2/28/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
take a look here on the marc archives.
http://marc.info/?l=php-general&m=
Daniel Brown schreef:
On Thu, Feb 28, 2008 at 5:06 AM, Jochem Maas <[EMAIL PROTECTED]> wrote:
Daniel Brown schreef:
On Wed, Feb 27, 2008 at 1:56 PM, Richard S. Crawford
> <[EMAIL PROTECTED]> wrote:
> [snip!]
>> I know that I could pass the name of the function as a parameter to the
>> er
29 feb 2008 kl. 03.41 skrev David Sveningsson:
Nathan Rixham skrev:
before going any further, your HTML page is in UTF-8 yes? with the
appropriate content-type line.
Yes, apache uses only utf-8 as charset and the html content-type
meta tag is set to utf-8 too. Also, the html form validates
It is not as bad as it looks. The only important columns are the first two,
the last two are how you dial from within the country to place long distance
international or national calls. In many countries, when there are several
low cost international call providers, they use different prefixes,
Andrés Robinet escribió:
-Original Message-
From: Dani Castaños [mailto:[EMAIL PROTECTED]
Sent: Friday, February 29, 2008 5:03 AM
To: PHP LIST
Subject: [PHP] Get country from Phone number
Hi all!
I'm looking for some piece of code or class which giving a phone number
it returns me from
Hi
Thank you for answering my question Jim.
I didn't notice the message get into the list because I get errors when
posting and then I quit to post and try to solve the problem. Your solution
is good and nice. I used scandir() instead of glob() with a recursive
function.
Best regards
holo
"Ji
What's the command to use if I want to remove all the directories and
files except 'a.gz' under a directory?
There isn't one. If you're using *nix, you could try this:
exec('find ! -name a.gz -maxdepth 1 -exec rm -rf {} \;');
Or something like that. If you're on Windows you'll need someone els
2008. 02. 29, péntek keltezéssel 10.17-kor Colin Guthrie ezt írta:
> Zoltán Németh wrote:
> > I strongly recommend git. it has several great advantages above cvs or
> > svn. for example, it does not store whole copies of the whole tree if
> > you make a branch, but stores only the differences. it i
Colin Guthrie wrote:
> The other thing about git particularly for web projects that store
> multiple revisions of binary data (images etc.) is that the git-clone
> could end up taking up much more space than the SVN equiv. Due to the
> fact that a git clone is essentially a full copy of the whole
>
Hi all,
What's the command to use if I want to remove all the directories and
files except 'a.gz' under a directory?
Thanks in advance.
Regards,
Shelley
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> -Original Message-
> From: Dani Castaños [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 29, 2008 5:03 AM
> To: PHP LIST
> Subject: [PHP] Get country from Phone number
>
> Hi all!
>
> I'm looking for some piece of code or class which giving a phone number
> it returns me from wich co
Zoltán Németh wrote:
> I strongly recommend git. it has several great advantages above cvs or
> svn. for example, it does not store whole copies of the whole tree if
> you make a branch, but stores only the differences. it is much faster,
> and losing a commit is really hard even if you screw thing
Hi all!
I'm looking for some piece of code or class which giving a phone number
it returns me from wich country is this phone.
Do you know where I can find something like this?
Thank you in advanced!
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/u
2008. 02. 28, csütörtök keltezéssel 22.42-kor Robert Cummings ezt írta:
> On Thu, 2008-02-28 at 23:52 +, Nathan Rixham wrote:
> > Robert Cummings wrote:
> > > On Thu, 2008-02-28 at 20:43 +, Nathan Rixham wrote:
> > >> [snip]
> > >> Eric Butera wrote:
> > >>> I can hit tab and shift/tab too
2008. 02. 28, csütörtök keltezéssel 20.25-kor Nathan Rixham ezt írta:
> Robert Cummings wrote:
> > On Thu, 2008-02-28 at 19:37 +, Stut wrote:
> >> On 28 Feb 2008, at 19:17, Wolf wrote:
> >>> Jason Pruim wrote:
> My editor automatically replaces like 4 spaces with a tab... Is
> there
2008. 02. 28, csütörtök keltezéssel 10.38-kor Nathan Nobbe ezt írta:
> On Thu, Feb 28, 2008 at 10:35 AM, David Giragosian <[EMAIL PROTECTED]>
> wrote:
>
> > On 2/28/08, Nathan Nobbe <[EMAIL PROTECTED]> wrote:
> > > take a look here on the marc archives.
> > > http://marc.info/?l=php-general&m=1204
79 matches
Mail list logo