FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » by get this format my explode file name like this through php
Show: Today's Messages :: Unread Messages :: Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
by get this format my explode file name like this through php [message #175894] Fri, 04 November 2011 02:41 Go to next message
srikanth is currently offline  srikanth
Messages: 2
Registered: November 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
N1N2N3N4N5N6N7N8N9N10N11N12N13N14YYYYMMDDHHMMSS.zip where,

N1N2N3N4 – Branch Code
N5N6N7N8N9 – ID.
N10N11N12N13N14- Sequence Number
YYYYMMDDHHMMSS – Date-time
Re: by get this format my explode file name like this through php [message #175896 is a reply to message #175894] Fri, 04 November 2011 04:45 Go to previous messageGo to next message
Derek Turner is currently offline  Derek Turner
Messages: 48
Registered: October 2010
Karma: 0
Member
add to buddy list
ignore all messages by this user
On Thu, 03 Nov 2011 23:41:06 -0700, srikanth wrote:

> N1N2N3N4N5N6N7N8N9N10N11N12N13N14YYYYMMDDHHMMSS.zip where,
>
> N1N2N3N4 – Branch Code
> N5N6N7N8N9 – ID.
> N10N11N12N13N14- Sequence Number
> YYYYMMDDHHMMSS – Date-time

http://catb.org/~esr/faqs/smart-questions.html
Re: by get this format my explode file name like this through php [message #175902 is a reply to message #175894] Fri, 04 November 2011 12:04 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
remove from buddy list
ignore all messages by this user
On Thu, 03 Nov 2011 23:41:06 -0700, srikanth wrote:

> N1N2N3N4N5N6N7N8N9N10N11N12N13N14YYYYMMDDHHMMSS.zip where,
>
> N1N2N3N4 – Branch Code
> N5N6N7N8N9 – ID.
> N10N11N12N13N14- Sequence Number
> YYYYMMDDHHMMSS – Date-time

What is your code?
What is your input data?
What is the result?
Why is the result not what you expect?

Rgds

Denis McMahon
Re: by get this format my explode file name like this through php [message #175905 is a reply to message #175894] Fri, 04 November 2011 17:54 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
remove from buddy list
ignore all messages by this user
On Thu, 03 Nov 2011 23:41:06 -0700, srikanth wrote:

Oh, this bit can be solved:

> YYYYMMDDHHMMSS – Date-time

Just read this:

http://uk.php.net/manual/en/function.date.php

Rgds

Denis McMahon
Re: by get this format my explode file name like this through php [message #175906 is a reply to message #175894] Sat, 05 November 2011 09:34 Go to previous messageGo to next message
Balazs Nadasdi is currently offline  Balazs Nadasdi
Messages: 7
Registered: November 2011
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
1. Why don't you use delimiters (eg: underscore)?
2. Why do you use YYYYMMDDHHMMSS? Unix Timestamp?
3. What is our problem? Describe it, please!
Re: by get this format my explode file name like this through php [message #175907 is a reply to message #175906] Sat, 05 November 2011 10:54 Go to previous messageGo to next message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
remove from buddy list
ignore all messages by this user
On Sat, 05 Nov 2011 06:34:31 -0700, Balazs Nadasdi wrote:

> 2. Why do you use
> YYYYMMDDHHMMSS? Unix Timestamp?

Conjecture - as he's creating a filename, I'd suggest that yyyymmddhhmmss
is more human readable in a filename than a unix timestamp is.

Rgds

Denis McMahon
Re: by get this format my explode file name like this through php [message #175908 is a reply to message #175907] Sat, 05 November 2011 13:20 Go to previous messageGo to next message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma: 0
Senior Member
add to buddy list
ignore all messages by this user
.oO(Denis McMahon)

> On Sat, 05 Nov 2011 06:34:31 -0700, Balazs Nadasdi wrote:
>
>> 2. Why do you use
>> YYYYMMDDHHMMSS? Unix Timestamp?
>
> Conjecture - as he's creating a filename, [...]

I understood it that way that he has a filename and wants to split it
into its parts as described ("explode"). In this case preg_match() or
sscanf() might help.

Micha

--
http://mfesser.de/blickwinkel
Re: by get this format my explode file name like this through php [message #175911 is a reply to message #175908] Sat, 05 November 2011 20:20 Go to previous message
Denis McMahon is currently offline  Denis McMahon
Messages: 634
Registered: September 2010
Karma: 0
Senior Member
remove from buddy list
ignore all messages by this user
On Sat, 05 Nov 2011 18:20:30 +0100, Michael Fesser wrote:

> .oO(Denis McMahon)
>
>> On Sat, 05 Nov 2011 06:34:31 -0700, Balazs Nadasdi wrote:
>>
>>> 2. Why do you use
>>> YYYYMMDDHHMMSS? Unix Timestamp?
>>
>> Conjecture - as he's creating a filename, [...]
>
> I understood it that way that he has a filename and wants to split it
> into its parts as described ("explode"). In this case preg_match() or
> sscanf() might help.

Oh. I thought he was trying to create the filename from the data.

If he wants to get the data from the filename, all he needs is a few
http://uk.php.net/manual/en/function.substr.php surely.

$branch = substr(string,start,length);

etc etc etc

Rgds

Denis McMahon
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: simple session question
Next Topic: Proxy Probe, an asynchronous proxy checker script
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Oct 09 06:30:38 EDT 2024

Total time taken to generate the page: 0.05670 seconds