Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/12/8647612/html/index.php:3) in /home/content/12/8647612/html/includes/bootstrap.inc on line 1162

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/12/8647612/html/index.php:3) in /home/content/12/8647612/html/includes/bootstrap.inc on line 1162

Warning: Cannot modify header information - headers already sent by (output started at /home/content/12/8647612/html/index.php:3) in /home/content/12/8647612/html/includes/bootstrap.inc on line 726

Warning: Cannot modify header information - headers already sent by (output started at /home/content/12/8647612/html/index.php:3) in /home/content/12/8647612/html/includes/bootstrap.inc on line 727

Warning: Cannot modify header information - headers already sent by (output started at /home/content/12/8647612/html/index.php:3) in /home/content/12/8647612/html/includes/bootstrap.inc on line 728

Warning: Cannot modify header information - headers already sent by (output started at /home/content/12/8647612/html/index.php:3) in /home/content/12/8647612/html/includes/bootstrap.inc on line 729
Code useful to open a file | CompShack.com

Code useful to open a file

Your rating: None Average: 2 (30 votes)

Write the code in PeopleCode Action:
&FileName = ;
&ret = GetAttachment("RECORD://CSGC_CSHT_ATACH", &FileName, "/" | &FileName, "PS_SERVDIR", True);
&PS_SERVDIR = (GetEnv("PS_SERVDIR")) | "/";
&FilePath = &PS_SERVDIR | &FileName;

If &ret = %Attachment_Success And
FileExists(&FilePath, %FilePath_Absolute) Then

&TxtFile = (GetFile(&FilePath, "R", %FilePath_Absolute));

While &TxtFile.ReadLine(&Input)
&Input = LTrim(RTrim(&Input, " "), " ");
;
End-While;
End-If;

&TxtFile.Close();

Please try to help out with unanswered topics on the forum. Chances are you have had the same issue/question some time in your IT career!