Gossamer Forum
Home : General : Perl Programming :

Re: [delicia] test for file exist not working

Quote Reply
Re: [delicia] test for file exist not working In reply to
senior moment! i forgot what i was doing. i've already got the restore working so ignore what i said in last message. $db_file contains the complete path and filename that exists. i'm reading the cfg line by line to find the line that has $db_file_name = blah blah. once found i'm stripping out "$db_file_name = ", the quotation marks, and all spaces. i'm substituting the actual data path or script path for the related variable. so the final $db_file is the correct path and filename.

there is a sub that opens and displays the contents of the file and i put in the link to it to be sure it's actually opening the correct file.
here's the link i'm using to test that it's opening the file:
Code:
a href="$db_script_url?db=$db_setup&admin_view_file=1&uid=$db_uid&file_data=$db_file"
note file_data=$db_file. here's excerpt of the sub that displays the file data:
Code:
$view_file_data = $in{file_data};
open (FILEVIEW, $view_file_data) or &cgierr ("unable to open: $view_file_data.\nReason: $!");

i.e. i'm still having the problem!
Subject Author Views Date
Thread test for file exist not working delicia 11950 May 25, 2018, 11:17 AM
Post Re: [delicia] test for file exist not working
delicia 11694 May 25, 2018, 11:20 AM
Thread Re: [delicia] test for file exist not working
Andy 11691 May 26, 2018, 12:59 AM
Thread Re: [Andy] test for file exist not working
delicia 11685 May 26, 2018, 6:12 AM
Thread Re: [delicia] test for file exist not working
delicia 11687 May 26, 2018, 6:29 AM
Thread Re: [delicia] test for file exist not working
delicia 11680 May 26, 2018, 6:53 AM
Thread Re: [delicia] test for file exist not working
Andy 11673 May 27, 2018, 1:16 AM
Thread Re: [Andy] test for file exist not working
delicia 11650 May 28, 2018, 8:36 AM
Post Re: [delicia] test for file exist not working
Andy 11633 May 28, 2018, 11:06 PM