This topic is locked
[SOLVED]

 Open file in Windows

5/11/2018 2:42:12 PM
PHPRunner General questions
D
Daviant author

Dear;

A query...
I have the following code within "List Page" and then "Clicks actions" in a field called "RXML" in "Run.ajax snippet" in the "Server" tab



$data = $ajax-> getCurrentRecord();

$xml = $data['XML'];

$file = $data['RXML'];

file_put_contents ($file, $xml);


So far so good, take the data from the $data registry and write to the disk an XML file named $file
The problem is that I need to open this file below and looking for information I've tried with

window.location, windows.open and some forms of html but I can not make it open ..
Any guidance on how to do it?

(It's a desktop app)
Thank you very much for your help

D
Daviant author 5/12/2018

Well, looking for alternatives, in this case it was not necessary to use a "Click actions" event.
The code works well in "View as" option "Custom" within the same field.

Simplifying the code, it works as follows:



file_put_contents($data['RXML'],$data['XML']);

$value = '<a href="'.$data["RXML"].'" target=_blank>XML</a>';


Thank you
(Google translator)