Ejecutar codigo php

mod_harbour es un módulo para Apache que permite correr tus PRGs directamente en la web!!!

Ejecutar codigo php

Postby Patricio Avalos Aguirre » Thu Jun 03, 2021 7:04 pm

Estimados

como poder integrar código prg y php

por ejemplo necesito hacer esto pero no funciona

Code: Select all  Expand view
//  {% 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 view
<?php
    require_once "controllers/template.php";

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

__________________________________________________________________
Version: Harbour 3.2.0dev (r1307082134),Compiler: Borland C++ 5.8.2 (32-bit)
PCode version: 0.3, FWH 13.2
http://www.sialm.cl
User avatar
Patricio Avalos Aguirre
 
Posts: 1059
Joined: Fri Oct 07, 2005 1:56 pm
Location: La Serena, Chile

Re: Ejecutar codigo php

Postby Antonio Linares » Fri Jun 04, 2021 8:08 am

Patricio,

Aqui tienes un ejemplo de como usar PHP desde mod_harbour:

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41315
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to mod_harbour

Who is online

Users browsing this forum: No registered users and 4 guests