ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WEBDEV concepts / Part 3 - Development environment
  • Overview
  • What is a PHP site?
  • Why develop a PHP site with WEBDEV?
  • Features of a PHP project
  • Creating a PHP project
  • RAD for PHP
  • Testing a PHP site in the editor
  • Deploying a PHP site
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
14. PHP generation in practice
Previous pageTable of contentsNext page
Overview
WEBDEV allows you to generate PHP sites without prior knowledge of PHP. The site can be entirely developed in WLanguage, like any standard WEBDEV site. However, you can write your own PHP code (Server code).

What is a PHP site?

A PHP site is compiled in PHP. If this site uses a database, an ODBC driver (MyODBC, ODBC for Oracle, etc.) or a Native MySQL Connector (also called Native Access) will be used to access this database.
The ODBC driver is specific to each database (it can be downloaded from the Website of the database publisher).
A PHP site includes ".php" pages and requires a PHP engine to be run.
To compile a PHP project created with WEBDEV, a PHP engine must be installed on the development computer. Several PHP engines are available on the Internet. Download and install the desired one. For example, you can use EasyPHP (http://www.easyphp.org/). This engine is given as an example. You can use any other PHP engine.
Remark: Prerequisite:
  • PHP 5 servers: Minimum recommended version: version 5.6.
  • PHP 7 servers: Minimum recommended version: version 7.0.22.
  • PHP 8 servers: Minimum recommended version: version 8.0.10.
  • Required MySQL database.

Why develop a PHP site with WEBDEV?

It may be useful to develop some sites (especially small ones) using PHP to make it easy to host them at no cost. You can now do so using WEBDEV.
Remark: The number of WLanguage functions that can be used in a PHP project is limited in this version. This number of functions will increase in forthcoming versions.
Features of a PHP project

Creating a PHP project

A PHP project is created like any other WEBDEV project:
  1. Click in the quick access buttons of WEBDEV. The new element window appears: click "Project".
  2. The project creation wizard starts.
  3. In one of the first steps of the wizard, you can choose the type of project that will be generated. Select "PHP" and follow the steps of the wizard.
    Once the project has been defined as a PHP project, all available WEBDEV tools automatically adapt to that type of project:
    • The RAD tool specific to PHP generates PHP code for many WEBDEV features.
    • The compiler indicates the functions or controls that cannot be used in PHP. A purple message is displayed in the "Compilation errors" pane.
    • The PHP site is deployed via WDDeploy.
Remark: It is recommended to create a new WEBDEV project to develop a PHP site rather than converting a WEBDEV site to PHP.

RAD for PHP

As with any project associated with an analysis, you can use the RAD methodology to generate the pages of your site.
The RAD methodology takes into account all the specific features of the PHP generation (controls, events and functions that can be used in a PHP site generated from WEBDEV).

Testing a PHP site in the editor

When testing a PHP site, the site is compiled in PHP and opened in your browser. You can directly see the PHP pages generated by WEBDEV.
Reminder: A PHP engine is required on the development computer.
The compilation of a PHP site is used to:
  • identify WLanguage programming errors.
  • see the controls, events and WLanguage functions not available in PHP. These errors appear in purple in the "Compilation errors" pane.
For more details on WEBDEV elements that are not available for PHP sites, see WLanguage functions available in PHP.

Deploying a PHP site

PHP sites and static sites are deployed using the same method. When creating the setup procedure, WDDeploy helps you implement your PHP site.
For more details, see the online help.
Previous pageTable of contentsNext page
Comments
Click [Add] to post a comment

Last update: 11/16/2023

Send a report | Local help