Page 1 of 1

Ejecutar codigo php

Posted: Thu Jun 03, 2021 7:04 pm
by Patricio Avalos Aguirre
Estimados

como poder integrar código prg y php

por ejemplo necesito hacer esto pero no funciona

Code: Select all | Expand

//  {% LoadHrb( 'lib/tweb/tweb.hrb' ) %}
//  {% LoadHrb( 'lib/funlib/funlibweb.hrb' ) %}

function main()


if  ! Is_Session()
    Redirect( "/webpato/index.prg" )
    retu nil
endif

<?php
    require_once "controllers/template.php";

    $template = new TemplateController();
    $template -> template();
?>


return nil

 



ya que tengo este codigo como php y funciona
archivo inicio.php

Code: Select all | Expand

<?php
    require_once "controllers/template.php";

    $template = new TemplateController();
    $template -> template();
?>
 

Re: Ejecutar codigo php

Posted: Fri Jun 04, 2021 8:08 am
by Antonio Linares
Patricio,

Aqui tienes un ejemplo de como usar PHP desde mod_harbour:

https://github.com/FiveTechSoft/mod_harbour/blob/master/samples/callphp.prg