4D v14.3PHP SET OPTION |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
PHP SET OPTION
|
PHP SET OPTION ( option ; value {; *} ) | ||||||||
Parameter | Type | Description | ||||||
option | Longint |
![]() |
Option to be set | |||||
value | Text, Boolean |
![]() |
New value of option | |||||
* | Operator |
![]() |
If passed: modification only applied to next call | |||||
The PHP SET OPTION command is used to set specific options before calling the PHP Execute command. The scope of this command is the current process.
Pass a constant from the "PHP" theme in the option parameter to designate the option to be modified and pass the new value for the option in the value parameter. Here is a description of the options:
Constant | Type | Value | Comment |
PHP privileges | Longint | 1 | Definition of specific user privileges relating to the execution of the script. Possible value(s): String in the form "User:Password". For example: "root:jd51254d" |
PHP raw result | Longint | 2 | Definition of processing mode for HTTP headers returned by PHP in the execution result when this result is of the Text type (when the result is of the BLOB type, headers are always kept). Possible value(s): Boolean. False (default value = remove HTTP headers from result. True = keep HTTP headers. |
By default, PHP SET OPTION sets the option for all subsequent calls to PHP Execute of the process. If you want to set it for the next call only, pass the star (*) parameter.
Execute the "myAdminScript.php" script with Admin access rights:
PHP SET OPTION(PHP privileges;"admin:mypwd";*)
`Since we pass the *, the admin privileges will only be used once
C_TEXT($result)
C_BOOLEAN($isOK)
$isOK:=PHP Execute("myAdminScript.php";$result)
If($isOK)
ALERT($result)
End if
Product: 4D
Theme: PHP
Number:
1059
Created: 4D v12
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)