This topic is locked

Create custom button

11/29/2019 3:59:10 PM
PHPRunner General questions
D
dirk author

Hello,
I want to make a button on my page view, which makes a file test.csv of some fields, but me not succeed.

I give you the code it already ...



function OnClient Before(pageObj,params,ajax,ctrl,row)

{

params["list"] = array (

array($data['code'],",", $data['waypoint naam'],",", $data['owner name'],",", $data['cache type'],",", $data['cachedoos'],",", $data['moeilijkheid'],",", $data['terrein'],",", $data['breedtegraad'],",", $data['lengtegraad'])



);

params["filenaam"]= "test.csv" ;
}


[color="#0000FF"]Server


function OnServer($params, $result)

{

$result["filenaam"] = fopen($params["filenaam"],"w");

$result["filenaam"]= $params["filenaam"];

foreach ($params["list"] as $line) {

fputcsv($result["filenaam"], $line);

}
fclose($params["filenaam"]);


Thanks

Dirk

Admin 11/29/2019

As a first step follow this article to find out what kind of error message you getting there:

https://xlinesoft.com/phprunner/docs/troubleshooting_custom_buttons.htm

D
dirk author 11/30/2019



As a first step follow this article to find out what kind of error message you getting there:

https://xlinesoft.com/phprunner/docs/troubleshooting_custom_buttons.htm


this is de error on your link
Server Error in '/' Application.

A potentially dangerous Request.Path value was detected from the client (<).

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: A potentially dangerous Request.Path value was detected from the client (<).
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): A potentially dangerous Request.Path value was detected from the client (<).]

System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +9939872

System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +53
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3429.0

D
dirk author 11/30/2019



As a first step follow this article to find out what kind of error message you getting there:

https://xlinesoft.com/phprunner/docs/troubleshooting_custom_buttons.htm


1435 karakters resterend
Hello,
The problem is that there is no data coming into the variables.