RE: [PHP] conversion script

From: Date: Tue, 08 May 2001 20:19:26 +0000
Subject: RE: [PHP] conversion script
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-51976@lists.php.net to get a copy of this message
if you're renaming to .PHP, i assume that you'll be using PHP. use PHP to solve your problem: This was taken directly from the PHP.net site: if ($dir = @opendir("/tmp")) { while($file = readdir($dir)) { echo "$file\n"; } closedir($dir); } as others have said before, "read the documentation". it really does help. > -----Original Message----- > From: Mark Maggelet [mailto:maggelet@mminternet.com] > Sent: Tuesday, May 08, 2001 2:34 PM > To: ryan@devnut.com; php-general@lists.php.net > Subject: Re: [PHP] conversion script > > > On Tue, 8 May 2001 11:09:18 -0700, Ryan Christensen (ryan@devnut.com) > wrote: > >Would anyone be able to help me out with this: > > > >I have quite a few (almost 2000) .html files that I would like to > >change > >over to the .php extension. Past that, I would also like to add > >text to the > >top & bottom of each page (for template purposes.) Does anyone know > >of a > >script that would automate this process, going through all the > >documents in > >a directory, and making the needed changes? > > > >Thanks in advance.. > > for the first part you can try (not tested): > > for i in /bin/ls *html |sed 's/.html//g'; do mv > $i.html $i.php; > done > > for the second part you might want to try putting it in your > auto_prepend_file. > > - Mark > > >---------------------------- > >Ryan Christensen > >OlyPen Technical Support > >ryanc@poeinc.com > >360.457.3000 > >800.303.8696 > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >For additional commands, e-mail: php-general-help@lists.php.net > >To contact the list administrators, e-mail: php-list- > >admin@lists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#51976) next »