Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-26-2004, 06:18 AM   PM User | #1
Frone
New to the CF scene

 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Frone is an unknown quantity at this point
Need a tool to generate several text files in batch

I often need to create several HMTL documents that have only slight differences. For example, 50 needed files may all need to be identical other than the file name and a couple of field names. All of the different items can be simply numerically incremented, so I figure that there has to be an application available to enter my static data, give it some rules for the dynamic fields, and push a button to have 50 files generated.

Anyone heard of such an animal? Any help will be greatly appreciated.

Thanks...
Frone is offline   Reply With Quote
Old 01-26-2004, 11:37 AM   PM User | #2
sweenster
Regular Coder

 
Join Date: Sep 2002
Location: Scotland
Posts: 407
Thanks: 0
Thanked 0 Times in 0 Posts
sweenster is an unknown quantity at this point
you want to use php my friend...
(or ASP or some other kind of server side langauge)

Here's a nice simple example to display a name and a photo depending on what info is passed via the url:

Code:
<html>
<body>
<?
print('Picture of '.$name.'<br>');
print('<img src="'.$pic.'" alt="'.$name.'">');
?>
</body>
</html>
Then the page can display different images by being called like so:
mypage.php?name=sweenster&pic=me.jpg
mypage.php?name=frone&pic=you.jpg
__________________
My body's a temple... and like those ancient Greek ones it's a ruin
sweenster.co.uk
sweenster is offline   Reply With Quote
Old 01-26-2004, 02:46 PM   PM User | #3
Frone
New to the CF scene

 
Join Date: Jan 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Frone is an unknown quantity at this point
Thanks for the suggestion (and the code snippet), but right now - I would just prefer to find a tool to generate these pages for me.

Maybe next time I'll take the time to setup PHP.

Thanks!
Frone is offline   Reply With Quote
Old 02-05-2004, 05:33 PM   PM User | #4
Darknight
New Coder

 
Join Date: Nov 2002
Posts: 87
Thanks: 0
Thanked 0 Times in 0 Posts
Darknight is an unknown quantity at this point
I agree with sweenster, but I also understand that investing time and effort into learning asp or php to only make 50 pages might not make since.

One idea would be to make the first page and copy it. On the copy use the 'find & replace' option found in most editors (I use Crimson Editor) to make the changes needed.

If you want to try a macro tool I recomend EZmacro.

Good luck.
Darknight is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:44 PM.


Advertisement
Log in to turn off these ads.