CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 CC 2.0.5 - display text file in field?

Print topic Send  topic

Author Message
Steve
Posted: 06/26/2002, 1:03 PM

I am using CC 2.0.5, PHP - No Templates.
I have a table with one field set as a file name. I have a detail page where I would like to have the specified file ($fldfile) read and displayed. For example, $fldfile for a specific record would be something like 'files/filename.txt'. I created another field in the form called "file_text" and tried a few different events using fopen(), fread() among others. Does anybody know how I could go about doing this?

Thanks,
Steve
Chris
Posted: 06/27/2002, 4:01 PM

I would try to write Before Show event:

$file=fopen($fldfile,"r");
$fldfile_text=fread($file,filesize($fldfile));
fclose($file);

or

$fldfile_text=join("",file($fldfile));

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.