|
|
|
|
This article focuses on the document that can be generated using PHP namely Rich Text Format (RTF). Rich Text Format (RTF) is a file type used to transfer formatted text documents between applications, even those that run on different platforms, such as IBM and Macintosh. RTF is a file format that many word processing programs understand; it is often used when a document is created in one word processing program but is expected to be edited in another word processing program.
for more details visit at...http://www.techxcel.com and details about article and its update at...http://www.techxcel.com/content/view/12/29/
This article has accompanying files
|
 |
| |
Terms of Agreement:
By using this article, you agree to the following terms...
- You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
- You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
- You may link to this article from another website, but ONLY if it is not wrapped in a frame.
- You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
|
date("F d, Y"),
'place' => 'Nagpur',
'name' => 'Flint Hancock',
'language' => 'PHP',
'grade' => 'A', );
$new_rtf = modifier($vars, "certificate.rtf");
$fr = fopen('output.rtf', 'w') ;
fwrite($fr, $new_rtf);
fclose($fr);
function modifier($vars, $rftfile) {
$xchange = array ('\\' => "\\\\",
'{' => "\{",
'}' => "\}");
$document = file_get_contents($rftfile);
if(!$document) {
return false;
}
foreach($vars as $key=>$value) {
$search = "%%".strtoupper($key)."%%";
foreach($xchange as $orig => $replace) {
$value = str_replace($orig, $replace, $value);
}
$document = str_replace($search, $value, $document);
}
return $document;
}
?>
sucessfully Generated File
|
|
Download article
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come
out every day, so no prevention program can catch 100% of them. For your own safety, please:
- Re-scan downloaded files using your personal virus checker before using it.
- NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
If you don't have a virus scanner, you can get one at many places on the net
including:McAfee.com
|
Terms of Agreement:
By using this article, you agree to the following terms...
- You may use
this article in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
- You MAY NOT redistribute this article (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
- You may link to this article from another website, but ONLY if it is not wrapped in a frame.
- You will abide by any additional copyright restrictions which the author may have placed in the article or article's description.
|
Other 3 submission(s) by this author
|
|
Report Bad Submission
|
Your Vote
|
| |
Other User Comments
|
1/19/2007 4:57:29 AM: Rizwan Syed
A job very well done. I must appriciate you on doing great work and writing this piece of code. 5G4M (If this comment was disrespectful, please report it.)
|
3/15/2007 2:57:56 PM: Marco Antonio Calvente Nieto
is simple to use an grant result in a very elegant way. Well done. 5 stars for you. (If this comment was disrespectful, please report it.)
|
5/18/2007 10:35:26 AM: BPena
REMARKABLY OUTSTANDING SCRIPT (If this comment was disrespectful, please report it.)
|
5/31/2007 8:31:12 AM: Joaquin Marcher
you're wrong, file_get_contents doesn't exists in php 3 just a lil correction (If this comment was disrespectful, please report it.)
|
6/1/2007 1:12:25 AM: Chetankumar Digambarrao Akarte
Thanks Joaquin Marcher to giude me i made a mistake that file_get_contents only supported by PHP version 4 And greater.. Chetankumar Akarte http://www.techxcel.com (If this comment was disrespectful, please report it.)
|
4/29/2009 9:24:55 PM: David
Great submission. He even included Fopen modes...
Thankyou for the upload. A+++ (If this comment was disrespectful, please report it.)
|
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular article, please
click here instead.)
To post feedback, first please login.
|