PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Miscellaneous
  • Encoding parameters
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Calls an external .php script and returns the result in a string. An HTTP request is performed: you have the ability to use a POST method or a GET method.
It is recommended to use this function to execute a PHP script (rather than the ScriptExecute function).
Example
// Exécute le script "Script1.php" situé à la racine
// du site Web et renvoie le résultat dans S
MonBuffer is Buffer
MonBuffer = PHPExécute("/Script1.php")
// Page de login en php. Envoie 3 paramètres avec la méthode POST
// Le script est présent dans le répertoire php
MonBuffer is Buffer
MonBuffer = PHPExécute("/php/Login.php", "Name=BOB&Pass=Mon+Secret&Lang=3", True)
Syntax
<Result> = PHPExecute(<Script name> [, <"Name1=Param1&Name2=Param2&..."> [, <Runtime method>]])
<Result>: Buffer or character string
Result of the script. In most cases, this result can be displayed by StringDisplay.
<Script name>: Character string
Address of the script. The script URL can have the following format:
  • "http://ServerName/Address.php": the Address.php script is found on the "ServerName" computer
  • "/Scripts/MyScript.php": MyScript.php is found on the current server, in the "/Scripts" site subdirectory.
  • you have the ability to use a secure address (https)
<"Name1=Param1&Name2=Param2&...">: Character string
Parameters intended for the script. This string contains for each parameter:
  • the parameter name,
  • the sign'=',
  • the parameter value.
Two parameters are separated by the & sign.
<Runtime method>: Boolean
  • True to run a POST method,
  • False (default value) to run a GET method.
Remarks

Miscellaneous

PHPExecute is slower than PHPDisplay.

Encoding parameters

The content of parameters is automatically encoded to get a valid URL:
  • transformation into UTF-8 (according to the options of the page and project).
  • encoding of special characters.
Component: wd270page.dll
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment