Reply to Re: Renaming a file but preserving the extension

Your name:

Reply:


Posted by Tom on 02/23/07 19:56

On 23 Feb 2007 10:44:23 -0800, laredotornado@zipmail.com wrote...
>
>Hi,
>
>A question for those of you who always seem to know the one line way
>of doing things. I'm using php 4.4.4 and I want to rename the first
>part of the file to a particular string. For example, if my input
>string were
>
>$input = "/path/to/my/file/12345.jpg";
>
>I would want my result to be "/path/to/my/file/header.jpg", assuming
>"header" was my fixed string.
>
>Any slick ways to do this?
>
>Thanks, - Dave
>

Maybe using the substr() function to get the parts of the path you need, then
piece them together with the text you need to add.

Tom
--
Newsguy.com
75+ days of Binary and Text Retention!
Higher levels of article completion!
Broader coverage of newsgroups

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация