- Overview
- How to?
- Limitations
Migrating a WEBDEV site to PHP
WEBDEV allows you to generate a PHP site without even knowing the PHP language. The site is developed in WLanguage like any other WEBDEV site. You also have the ability to directly enter your PHP code. A syntactic and lexical analysis is now available for the PHP code (and for the Javascript code). An existing WEBDEV site can be migrated to PHP. This help page presents the different operations to perform. We recommend that you keep a version of your project in WEBDEV before it is migrated to PHP. When generating the pages, the WEBDEV pages and the WLanguage functions are automatically converted into PHP pages. Remark: Prerequisite: - PHP 5 servers: Minimum recommended version: version 5.3.
- PHP 7 servers: Minimum recommended version: version 7.0.22.
- PHP 8 servers: Minimum recommended version: version 8.0.10.
To migrate a WEBDEV site to PHP: - Open your project in WEBDEV.
- Open the project description: on the "Project" tab, in the "Project" group, click "Description". Specify that the project is a PHP project: check "Dynamic PHP site" ("General" tab) and validate.
- For each page of your project, specify that the page is a PHP page. To do so, display each page in the editor and display its description ("Description" in the context menu of the page). Select "PHP page".
Remark: the option "PHP generation with context" allows you to use the variables global to the project in the pages. - Compile your project: on the "Project" tab, in the "Project" group, expand "Recompile and synchronize" and select "Recompile project". The errors are displayed in the "Compilation errors" pane in the editor. Adapt the code of your project to the specific features of PHP.
- If your project is associated with an analysis, you need to convert the analysis to the MySQL format. To do so, create a connection to an existing MySQL database found on a server and associate the files to this connection. The data files will be automatically created in this database (during the call to HCreationIfNotFound or HCreation, or if "Automatically create the data files when they are opened" is enabled).
- Your project is migrated to PHP. It can operate and be deployed.
The following elements are not available in the PHP generation: - The currency, buffer, variant and Unicode string types.
If a currency edit control is created, it is considered as being a numeric control. - the very flexible equality operator, "~~"
- the "*" operator for passing parameters by default
- two (and more)-dimensional arrays
- structures
- the "GOTO" statement
- the "NULL" keyword
- Object-Oriented Programming (OOP)
- default assignment of the function parameters.
- the management of reals is more precise in WLanguage than in PHP (the number of decimals used in PHP is less than the number of decimals used in WLanguage).
Remark: Prerequisite: - PHP 5 servers: Minimum recommended version: version 5.3.
- PHP 7 servers: Minimum recommended version: version 7.0.22.
- PHP 8 servers: Minimum recommended version: version 8.0.10.
|
|
|
|