PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > alt.php > Function that returns date of file.
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Function that returns date of file.

Réponse
 
LinkBack Outils de la discussion
Vieux 10/12/2007, 10h07   #1
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Function that returns date of file.

Is there a PHP function that can reference a file and return
the date that the file was last updated?

Regards,



Fred
  Réponse avec citation
Vieux 10/12/2007, 10h50   #2
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

On Mon, 10 Dec 2007 05:07:25 -0500, Fred Atkinson
<fatkinson@mishmash.com> wrote:

> Is there a PHP function that can reference a file and return
>the date that the file was last updated?
>
> Regards,
>
>
>
> Fred


Well, I found two functions that do it. They are:

<?php

// outputs e.g. somefile.txt was last changed: December 29 2002
22:16:23.

$filename = '../subdirectory/file.dat';
if (file_exists($filename)) {
echo "$filename was last changed: " . date("F d Y H:i:s.",
filectime($filename));
}

?>

and:

<?php
// outputs e.g. 'March 04, 1998.'
echo date ("F d, Y", getlastmod());
?>

The problem is that their output is like this:

December 10, 2007 filemtime

I can't get the 'filemtime' off the end of the string.

How do I get rid of the 'filemtime' on the end of the
string?



Fred
  Réponse avec citation
Vieux 10/12/2007, 10h50   #3
rf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.


"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
news:ts3ql3dnbjbpuckh68u6k8doavkohmgar7@4ax.com...
> Is there a PHP function that can reference a file and return
> the date that the file was last updated?


Hmmm. Tricky.

PHP manual:

http://www.php.net/manual/en/

Filesystem functions:

http://www.php.net/manual/en/ref.filesystem.php

Modified time? :

http://www.php.net/manual/en/function.filemtime.php

Not so tricky after all :-)

--
Richard.


  Réponse avec citation
Vieux 10/12/2007, 11h09   #4
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

When I used them in a PHP page, the filemtime did not appear.
But when I use the functions by themselves, the filemtime does appear.
Strange.




Fred

On Mon, 10 Dec 2007 05:50:00 -0500, Fred Atkinson
<fatkinson@mishmash.com> wrote:

>On Mon, 10 Dec 2007 05:07:25 -0500, Fred Atkinson
><fatkinson@mishmash.com> wrote:
>
>> Is there a PHP function that can reference a file and return
>>the date that the file was last updated?
>>
>> Regards,
>>
>>
>>
>> Fred

>
> Well, I found two functions that do it. They are:
>
><?php
>
>// outputs e.g. somefile.txt was last changed: December 29 2002
>22:16:23.
>
>$filename = '../subdirectory/file.dat';
>if (file_exists($filename)) {
> echo "$filename was last changed: " . date("F d Y H:i:s.",
>filectime($filename));
>}
>
>?>
>
> and:
>
><?php
>// outputs e.g. 'March 04, 1998.'
>echo date ("F d, Y", getlastmod());
>?>
>
> The problem is that their output is like this:
>
> December 10, 2007 filemtime
>
> I can't get the 'filemtime' off the end of the string.
>
> How do I get rid of the 'filemtime' on the end of the
>string?
>
>
>
> Fred

  Réponse avec citation
Vieux 10/12/2007, 11h55   #5
rf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.


"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
news:bg7ql3tpoj63gddagiiq8hs28uq2qdhhh0@4ax.com...
> When I used them in a PHP page, the filemtime did not appear.
> But when I use the functions by themselves, the filemtime does appear.
> Strange.
>
>
>
>
> Fred
>
> On Mon, 10 Dec 2007 05:50:00 -0500, Fred Atkinson
> <fatkinson@mishmash.com> wrote:
>
>>On Mon, 10 Dec 2007 05:07:25 -0500, Fred Atkinson
>><fatkinson@mishmash.com> wrote:
>>
>>> Is there a PHP function that can reference a file and return
>>>the date that the file was last updated?
>>>
>>> Regards,
>>>
>>>
>>>
>>> Fred

>>
>> Well, I found two functions that do it. They are:
>>
>><?php
>>
>>// outputs e.g. somefile.txt was last changed: December 29 2002
>>22:16:23.
>>
>>$filename = '../subdirectory/file.dat';
>>if (file_exists($filename)) {
>> echo "$filename was last changed: " . date("F d Y H:i:s.",
>>filectime($filename));
>>}
>>
>>?>
>>
>> and:
>>
>><?php
>>// outputs e.g. 'March 04, 1998.'
>>echo date ("F d, Y", getlastmod());
>>?>
>>
>> The problem is that their output is like this:
>>
>> December 10, 2007 filemtime
>>
>> I can't get the 'filemtime' off the end of the string.
>>
>> How do I get rid of the 'filemtime' on the end of the
>>string?



RTFM.

--
Richard.


  Réponse avec citation
Vieux 10/12/2007, 13h14   #6
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

On Mon, 10 Dec 2007 11:55:15 GMT, "rf" <rf@invalid.com> wrote:

>RTFM.


I did read it. But I found no reference to that weird
addition to the string.



Fred
  Réponse avec citation
Vieux 10/12/2007, 14h37   #7
Kim André Akerø
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

Fred Atkinson wrote:

> On Mon, 10 Dec 2007 11:55:15 GMT, "rf" <rf@invalid.com> wrote:
>
> > RTFM.

>
> I did read it. But I found no reference to that weird
> addition to the string.


Is there any reference in your PHP file to "filemtime" *outside* your
code statements? (ie. outside <?php and ?>)

(Hint: find *all* occurrences of "filemtime".)

--
Kim André Akerø
- kimandre@NOSPAMbetadome.com
(remove NOSPAM to contact me directly)
  Réponse avec citation
Vieux 10/12/2007, 18h36   #8
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.


"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
news:cteql3hl9sck7ja7mkqb9482cseq1ed6vv@4ax.com...
> On Mon, 10 Dec 2007 11:55:15 GMT, "rf" <rf@invalid.com> wrote:
>
>>RTFM.

>
> I did read it. But I found no reference to that weird
> addition to the string.


then you're a dumbass!

they were showing you HOW to use the function(s) you want, and how to get it
to echo to the browser! look up the functions they use, then look them up in
TFM. then, if you can, pull your head outta your ass and use the functions
to get the output YOU want, not what the EXAMPLE gave.


  Réponse avec citation
Vieux 10/12/2007, 18h46   #9
Rich
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

On Mon, 10 Dec 2007 10:50:05 GMT, rf wrote...
>
>
>"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
>news:ts3ql3dnbjbpuckh68u6k8doavkohmgar7@4ax.com.. .
>> Is there a PHP function that can reference a file and return
>> the date that the file was last updated?

>
>Hmmm. Tricky.
>
>PHP manual:
>
>http://www.php.net/manual/en/
>
>Filesystem functions:
>
>http://www.php.net/manual/en/ref.filesystem.php
>
>Modified time? :
>
>http://www.php.net/manual/en/function.filemtime.php
>
>Not so tricky after all :-)
>


  Réponse avec citation
Vieux 10/12/2007, 18h53   #10
Rich
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

On Mon, 10 Dec 2007 06:09:10 -0500, Fred Atkinson wrote...
>
> When I used them in a PHP page, the filemtime did not appear.
>But when I use the functions by themselves, the filemtime does appear.
> Strange.
>
>



I think the int getlastmod() function gets the time of the last modification of
the current page. From the information at the php.net site they recommended
using the filemtime() function for the time of a different file.

Rich
--
NewsGuy Accounts Go Jumbo!
NewsGuy Express increased from 30 to 50 GB of download capacity
http://newsguy.com/overview.htm

>
>
> Fred
>
>On Mon, 10 Dec 2007 05:50:00 -0500, Fred Atkinson
><fatkinson@mishmash.com> wrote:
>
>>On Mon, 10 Dec 2007 05:07:25 -0500, Fred Atkinson
>><fatkinson@mishmash.com> wrote:
>>
>>> Is there a PHP function that can reference a file and return
>>>the date that the file was last updated?
>>>
>>> Regards,
>>>
>>>
>>>
>>> Fred

>>
>> Well, I found two functions that do it. They are:
>>
>><?php
>>
>>// outputs e.g. somefile.txt was last changed: December 29 2002
>>22:16:23.
>>
>>$filename = '../subdirectory/file.dat';
>>if (file_exists($filename)) {
>> echo "$filename was last changed: " . date("F d Y H:i:s.",
>>filectime($filename));
>>}
>>
>>?>
>>
>> and:
>>
>><?php
>>// outputs e.g. 'March 04, 1998.'
>>echo date ("F d, Y", getlastmod());
>>?>
>>
>> The problem is that their output is like this:
>>
>> December 10, 2007 filemtime
>>
>> I can't get the 'filemtime' off the end of the string.
>>
>> How do I get rid of the 'filemtime' on the end of the
>>string?
>>
>>
>>
>> Fred


  Réponse avec citation
Vieux 11/12/2007, 15h47   #11
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

And you're a pretty untrained person.



Fred

On Mon, 10 Dec 2007 12:36:43 -0600, "Steve" <no.one@example.com>
wrote:

>
>"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
>news:cteql3hl9sck7ja7mkqb9482cseq1ed6vv@4ax.com.. .
>> On Mon, 10 Dec 2007 11:55:15 GMT, "rf" <rf@invalid.com> wrote:
>>
>>>RTFM.

>>
>> I did read it. But I found no reference to that weird
>> addition to the string.

>
>then you're a dumbass!
>
>they were showing you HOW to use the function(s) you want, and how to get it
>to echo to the browser! look up the functions they use, then look them up in
>TFM. then, if you can, pull your head outta your ass and use the functions
>to get the output YOU want, not what the EXAMPLE gave.
>

  Réponse avec citation
Vieux 11/12/2007, 16h48   #12
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

> On Mon, 10 Dec 2007 12:36:43 -0600, "Steve" <no.one@example.com>
> wrote:
>
>>
>>"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
>>news:cteql3hl9sck7ja7mkqb9482cseq1ed6vv@4ax.com. ..
>>> On Mon, 10 Dec 2007 11:55:15 GMT, "rf" <rf@invalid.com> wrote:
>>>
>>>>RTFM.
>>>
>>> I did read it. But I found no reference to that weird
>>> addition to the string.

>>
>>then you're a dumbass!
>>
>>they were showing you HOW to use the function(s) you want, and how to get
>>it
>>to echo to the browser! look up the functions they use, then look them up
>>in
>>TFM. then, if you can, pull your head outta your ass and use the functions
>>to get the output YOU want, not what the EXAMPLE gave.


TOP POSTING FIXED HERE !!! (and he says i'm untrained...lol)

"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
news:18ctl318cddh5bakmepkardc255ej4i6em@4ax.com...
> And you're a pretty untrained person.


really? you don't even know me, so i can only reason that i offended you and
you are offering an insult without merit. my insult was warranted as you
demonstrated NO use of thought in reading the example(s) in TFM. further,
you just copied them into your code and want them to do what YOU want them
to do. anyway, as for your retort, if you're going to just throw uninformed
insults at people, they have to be witty...otherwise, no one listens or
cares.

as for engaging in further arguments...your counter to my argument should be
that you were NOT brain-dead when you RTFM. hint, i at least recognized the
code as being copied FROM TFM...others who responded suggested that you
RTFM. that means your 'NOT brain-dead' argument won't go far - your state
before RTFM was so similar to your state after you RTFM that no one else
could tell but me that you had actually RTFM. and, that's not funny...it's
just sad! as for me being untrained, you have no proof of what level of
skills i have. however, since you've stated no base line standard rule by
which i'd be compared, i can only assume that you are the benchmark. in that
case, my counter is easily made and i need say no more. now THAT is funny!


  Réponse avec citation
Vieux 12/12/2007, 03h27   #13
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

On Tue, 11 Dec 2007 10:48:48 -0600, "Steve" <no.one@example.com>
wrote:

>"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
>news:18ctl318cddh5bakmepkardc255ej4i6em@4ax.com.. .
>> And you're a pretty untrained person.

>
>really? you don't even know me, so i can only reason that i offended you and
>you are offering an insult without merit. my insult was warranted as you
>demonstrated NO use of thought in reading the example(s) in TFM. further,
>you just copied them into your code and want them to do what YOU want them
>to do. anyway, as for your retort, if you're going to just throw uninformed
>insults at people, they have to be witty...otherwise, no one listens or
>cares.
>
>as for engaging in further arguments...your counter to my argument should be
>that you were NOT brain-dead when you RTFM. hint, i at least recognized the
>code as being copied FROM TFM...others who responded suggested that you
>RTFM. that means your 'NOT brain-dead' argument won't go far - your state
>before RTFM was so similar to your state after you RTFM that no one else
>could tell but me that you had actually RTFM. and, that's not funny...it's
>just sad! as for me being untrained, you have no proof of what level of
>skills i have. however, since you've stated no base line standard rule by
>which i'd be compared, i can only assume that you are the benchmark. in that
>case, my counter is easily made and i need say no more. now THAT is funny!


When I said you were untrained, I wasn't refering to your
technical skills. I was referring to your conduct that was probably
brought about by your upbringing.

You're emotionally charged response simply confirms what I've
already said. I don't need to say more.

You can assume whatever you'd like.



Fred

  Réponse avec citation
Vieux 12/12/2007, 05h37   #14
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.


"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
news:q5lul35misqbe4afb62oeg48j65j8ktg86@4ax.com...
> On Tue, 11 Dec 2007 10:48:48 -0600, "Steve" <no.one@example.com>
> wrote:
>
>>"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
>>news:18ctl318cddh5bakmepkardc255ej4i6em@4ax.com. ..
>>> And you're a pretty untrained person.

>>
>>really? you don't even know me, so i can only reason that i offended you
>>and
>>you are offering an insult without merit. my insult was warranted as you
>>demonstrated NO use of thought in reading the example(s) in TFM. further,
>>you just copied them into your code and want them to do what YOU want them
>>to do. anyway, as for your retort, if you're going to just throw
>>uninformed
>>insults at people, they have to be witty...otherwise, no one listens or
>>cares.
>>
>>as for engaging in further arguments...your counter to my argument should
>>be
>>that you were NOT brain-dead when you RTFM. hint, i at least recognized
>>the
>>code as being copied FROM TFM...others who responded suggested that you
>>RTFM. that means your 'NOT brain-dead' argument won't go far - your state
>>before RTFM was so similar to your state after you RTFM that no one else
>>could tell but me that you had actually RTFM. and, that's not funny...it's
>>just sad! as for me being untrained, you have no proof of what level of
>>skills i have. however, since you've stated no base line standard rule by
>>which i'd be compared, i can only assume that you are the benchmark. in
>>that
>>case, my counter is easily made and i need say no more. now THAT is funny!

>
> When I said you were untrained, I wasn't refering to your
> technical skills. I was referring to your conduct that was probably
> brought about by your upbringing.


you've no idea of that either. it is completely illogical to assume one is
bound to training in any context. you have no information from which to
infer such a conclusion.

> You're emotionally charged response simply confirms what I've
> already said. I don't need to say more.


who said i was emotional? you? you can't even read a manual. what makes you
think you can correctly read anything else, much less induct my state of
emotional being from written text? for the rest of the on-lookers, those who
are literate, i made pretty straight-forward claims about your
intelligence...and gave good indicators as to their correctness.

> You can assume whatever you'd like.


sorry, i've not assumed anything. this is quite unlike your claims. beyond
not having enough information to go on in order to support your claims, i
think you simply lack the mental facilities to best judge your experiences.
i feel for you.


  Réponse avec citation
Vieux 13/12/2007, 01h49   #15
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

I would hate to go through life being like you.

I'll include you in my prayers.




Fred

  Réponse avec citation
Vieux 13/12/2007, 14h37   #16
Steve
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.


"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
news:is31m3d4rkccpa08vg6bbd7ou7pvomaa8u@4ax.com...
> I would hate to go through life being like you.


and i care because?

> I'll include you in my prayers.


the ultimate exclaimation point on your anxiousness to infer certainty from
the absence of proof...prayer. lol.


  Réponse avec citation
Vieux 13/12/2007, 23h41   #17
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

The sad thing is that you *don't* care about yourself.



Fred

On Thu, 13 Dec 2007 08:37:44 -0600, "Steve" <no.one@example.com>
wrote:

>
>"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
>news:is31m3d4rkccpa08vg6bbd7ou7pvomaa8u@4ax.com.. .
>> I would hate to go through life being like you.

>
>and i care because?
>
>> I'll include you in my prayers.

>
>the ultimate exclaimation point on your anxiousness to infer certainty from
>the absence of proof...prayer. lol.
>

  Réponse avec citation
Vieux 14/12/2007, 01h23   #18
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

Fred Atkinson wrote:
> On Thu, 13 Dec 2007 08:37:44 -0600, "Steve" <no.one@example.com>
> wrote:
>
>> "Fred Atkinson" <fatkinson@mishmash.com> wrote in message
>> news:is31m3d4rkccpa08vg6bbd7ou7pvomaa8u@4ax.com...
>>> I would hate to go through life being like you.

>> and i care because?
>>
>>> I'll include you in my prayers.

>> the ultimate exclaimation point on your anxiousness to infer certainty from
>> the absence of proof...prayer. lol.
>>

>
> The sad thing is that you *don't* care about yourself.
>
>
>
> Fred
>


(Top posting fixed)

One correction, Fred. ALL he cares about is himself.

But please don't top post.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 14/12/2007, 03h29   #19
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

>One correction, Fred. ALL he cares about is himself.
>
>But please don't top post.


And thank you for your courteous response.

I can see what you are saying. But if he cared more about
himself, he wouldn't let himself be perceived in that manner. People
like him are insecure. They try to make others feel inferior because
it's the only way they can feel secure. When they don't succeed in
doing that (as you could see from his replies), they get quite
frantic. For me, I think Eleanor Roosevelt said it best.

OK, on the request. I heartily dislike bottom postings. I
don't understand why anyone would want to scroll through a bunch of
text that was read in previous posts before reading the latest
addition to the discussion. But since I'm being asked nicely, I'll
try to comply. I don't know why anyone thinks that is so much better.
I'm not one who does. But that's my preference.

I still can't figure out why that script returns that weird
string after the date/time when it is used by itself. But as long as
it doesn't return it when I insert it into a page, I guess it doesn't
matter.

I look forward to learning some good PHP tricks from your
posts. I've done a little PHP coding and wrote a script that I use on
one of my Web sites for a special application. I wrote it several
years ago and it's been running glitch free all during that time. In
fact, I showed it to one of my colleagues at the University where I
work today. He liked it and analyzed my code.

I'm going to rewrite it to run off of a MySQL database rather
than a delimited text file. I'm going to do the coding. He's going
to be my support when I hit something I can't figure out. And though
I was really good with Paradox relational databases many years ago, I
know little about MySQL. But he does. So that should work.

Regards,




Fred Atkinson
  Réponse avec citation
Vieux 14/12/2007, 03h49   #20
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

Fred Atkinson wrote:
>> One correction, Fred. ALL he cares about is himself.
>>
>> But please don't top post.

>
> And thank you for your courteous response.
>
> I can see what you are saying. But if he cared more about
> himself, he wouldn't let himself be perceived in that manner. People
> like him are insecure. They try to make others feel inferior because
> it's the only way they can feel secure. When they don't succeed in
> doing that (as you could see from his replies), they get quite
> frantic. For me, I think Eleanor Roosevelt said it best.
>


I think it's deeper than that. Some of the time he's very lucid and
ful. Then other times he falls into this junk. There seems to be
something else going one.

> OK, on the request. I heartily dislike bottom postings. I
> don't understand why anyone would want to scroll through a bunch of
> text that was read in previous posts before reading the latest
> addition to the discussion. But since I'm being asked nicely, I'll
> try to comply. I don't know why anyone thinks that is so much better.
> I'm not one who does. But that's my preference.
>


Our group uses bottom posting because that's how you normally read.
It's very frustrating to have to keep scrolling up and down to read
posts. And if you don't want to read the previous posts (and the
response is bottom-posted), then just use ctrl-end to get to the bottom
of the post.

Of course, that doesn't work with interleaved posting like this.

But thanks for trying to stay with the group's standards.

> I still can't figure out why that script returns that weird
> string after the date/time when it is used by itself. But as long as
> it doesn't return it when I insert it into a page, I guess it doesn't
> matter.
>


I don't see why it should, either, and your code doesn't produce the
extra string on my system. Is that your entire script? Or is there
perhaps something after it which is outputting the string?

> I look forward to learning some good PHP tricks from your
> posts. I've done a little PHP coding and wrote a script that I use on
> one of my Web sites for a special application. I wrote it several
> years ago and it's been running glitch free all during that time. In
> fact, I showed it to one of my colleagues at the University where I
> work today. He liked it and analyzed my code.
>


Several years ago a flat file was probably your most commonly available
option :-)
> I'm going to rewrite it to run off of a MySQL database rather
> than a delimited text file. I'm going to do the coding. He's going
> to be my support when I hit something I can't figure out. And though
> I was really good with Paradox relational databases many years ago, I
> know little about MySQL. But he does. So that should work.
>
> Regards,
>
>
>
>
> Fred Atkinson


MySQL isn't that hard to use - just learning SQL is the worst part. And
read up on "database normalization". If you don't start with a well
designed database your job will be all that much harder.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 14/12/2007, 04h35   #21
Fred Atkinson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

On Thu, 13 Dec 2007 22:49:16 -0500, Jerry Stuckle
<jstucklex@attglobal.net> wrote:

>Fred Atkinson wrote:
>I think it's deeper than that. Some of the time he's very lucid and
>ful. Then other times he falls into this junk. There seems to be
>something else going one.


I guess he has his moments.

>Our group uses bottom posting because that's how you normally read.
>It's very frustrating to have to keep scrolling up and down to read
>posts. And if you don't want to read the previous posts (and the
>response is bottom-posted), then just use ctrl-end to get to the bottom
>of the post.


I haven't tried that and I don't even know if that works in
Agent. But I'll give it a try.

>Of course, that doesn't work with interleaved posting like this.


I see.

>But thanks for trying to stay with the group's standards.


No problem.

>> I still can't figure out why that script returns that weird
>> string after the date/time when it is used by itself. But as long as
>> it doesn't return it when I insert it into a page, I guess it doesn't
>> matter.
>>

>
>I don't see why it should, either, and your code doesn't produce the
>extra string on my system. Is that your entire script? Or is there
>perhaps something after it which is outputting the string?


When it returned that string, I had it in a .php file that
consisted only of the html, head, title, and body tags with the script
between the body tags. There was nothing else in the page. That's
when it happend.

But when I put it in the page where I wanted it to go (right
after the text that said what it refered to), it gave the date
correctly without that extra string. Incredibly weird.

>> I look forward to learning some good PHP tricks from your
>> posts. I've done a little PHP coding and wrote a script that I use on
>> one of my Web sites for a special application. I wrote it several
>> years ago and it's been running glitch free all during that time. In
>> fact, I showed it to one of my colleagues at the University where I
>> work today. He liked it and analyzed my code.
>>

>
>Several years ago a flat file was probably your most commonly available
>option :-)


True.

My first programming language was Fortran IV on punch cards.
This was in the late sixties when I was in high school (back then,
getting computer training in high school was completely unheard of).
Years later, I took a course in the old BASIC when the PCs first hit
the market (with the line numbers). I wrote a couple of programs for
my employer. One was terminal circuit inventory. I took a coursei in
PASCAL but never did anything with it. I later took a course in C but
never wrote anything in C.

I did write scripts for Procomm Plus (it was called 'Aspect
language') which was structurally similar. Before I took the C class,
I make an IF statement that required the 'equals equals'. As an old
BASIC programmer, I never heard of the equals equals (or if I did
learn it in that PASCAL class, I don't remember it. But it was years
before I did this). I finally had to call someone who was fluent in
writing Aspect scripts. Once I added another equals sign, it worked
just fine. As I found out, it's a bit different than the old BASIC.

Flat files did the job, all right. But I suspect that
databases will do better. I just need to learn how to code them.

>MySQL isn't that hard to use - just learning SQL is the worst part. And
>read up on "database normalization". If you don't start with a well
>designed database your job will be all that much harder.


My colleague ed me create the database and the structure
for it today. That's one of his specialities. It only involves three
fields per record. The third one is to track how many times that
record has been retrieved. The first two will be used by the PHP to
code into the pages. All in all, my database needs are fairly simple.
Regards,




Fred
  Réponse avec citation
Vieux 14/12/2007, 04h46   #22
rf
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.


"Fred Atkinson" <fatkinson@mishmash.com> wrote in message
news:7514m39kh60oujdrbltsnkuvfmu7lud4vn@4ax.com...
> On Thu, 13 Dec 2007 22:49:16 -0500, Jerry Stuckle


> When it returned that string, I had it in a .php file that
> consisted only of the html, head, title, and body tags with the script
> between the body tags. There was nothing else in the page. That's
> when it happend.


There will be a reason.

Post the code.

--
Richard.


  Réponse avec citation
Vieux 14/12/2007, 11h34   #23
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

Fred Atkinson wrote:
> On Thu, 13 Dec 2007 22:49:16 -0500, Jerry Stuckle
> <jstucklex@attglobal.net> wrote:
>
>
> When it returned that string, I had it in a .php file that
> consisted only of the html, head, title, and body tags with the script
> between the body tags. There was nothing else in the page. That's
> when it happend.
>
> But when I put it in the page where I wanted it to go (right
> after the text that said what it refered to), it gave the date
> correctly without that extra string. Incredibly weird.
>


Which makes no sense at all. There must be something else going on, but
I have no idea what it would be. I didn't get the extra string in
either a web page or from a CLI.

>> Several years ago a flat file was probably your most commonly available
>> option :-)

>
> True.
>
> My first programming language was Fortran IV on punch cards.
> This was in the late sixties when I was in high school (back then,
> getting computer training in high school was completely unheard of).
> Years later, I took a course in the old BASIC when the PCs first hit
> the market (with the line numbers). I wrote a couple of programs for
> my employer. One was terminal circuit inventory. I took a coursei in
> PASCAL but never did anything with it. I later took a course in C but
> never wrote anything in C.
>
> I did write scripts for Procomm Plus (it was called 'Aspect
> language') which was structurally similar. Before I took the C class,
> I make an IF statement that required the 'equals equals'. As an old
> BASIC programmer, I never heard of the equals equals (or if I did
> learn it in that PASCAL class, I don't remember it. But it was years
> before I did this). I finally had to call someone who was fluent in
> writing Aspect scripts. Once I added another equals sign, it worked
> just fine. As I found out, it's a bit different than the old BASIC.
>
> Flat files did the job, all right. But I suspect that
> databases will do better. I just need to learn how to code them.
>


I've got a couple of versions on you, I guess. My first programming was
on Fortran II, also back in the 60's. Ran it on an IBM 1401 with 4,000
bytes (not 4K) of core memory. And yes, I still remember punched cards.
Kids have it so easy these days :-)

>> MySQL isn't that hard to use - just learning SQL is the worst part. And
>> read up on "database normalization". If you don't start with a well
>> designed database your job will be all that much harder.

>
> My colleague ed me create the database and the structure
> for it today. That's one of his specialities. It only involves three
> fields per record. The third one is to track how many times that
> record has been retrieved. The first two will be used by the PHP to
> code into the pages. All in all, my database needs are fairly simple.
> Regards,
>
>
>
>
> Fred
>


That's a good way to start out. It makes learning a lot easier if you
can keep your first databases simple. Wish it were always true :-)

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 14/12/2007, 11h35   #24
Jerry Stuckle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.

rf wrote:
> "Fred Atkinson" <fatkinson@mishmash.com> wrote in message
> news:7514m39kh60oujdrbltsnkuvfmu7lud4vn@4ax.com...
>> On Thu, 13 Dec 2007 22:49:16 -0500, Jerry Stuckle

>
>> When it returned that string, I had it in a .php file that
>> consisted only of the html, head, title, and body tags with the script
>> between the body tags. There was nothing else in the page. That's
>> when it happend.

>
> There will be a reason.
>
> Post the code.
>


He already did. Check up the thread.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

  Réponse avec citation
Vieux 14/12/2007, 13h33   #25
Kim André Akerø
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Function that returns date of file.