Al final he generado los archivos php desde el símbolo de sistema de la siguiente forma:
>FmToPhp project1.lpi y me ha generado:
project1.php y project1.xml.php
project1.php contiene:
Código PHP:
<?php
// Generated by FmToPhp 1.0.0 at 15:45:05 on 2008-10-24 from:
// unit1.lfm
ini_set("display_errors", 1);
error_reporting(E_ALL);
require_once("vcl/vcl.inc.php");
use_unit("forms.inc.php");
use_unit("comctrls.inc.php");
class TForm1 extends Page
{
public $Form1_Window = null; //Window
public $Button1 = null; //Button
public $Edit1 = null; //TextField
public $Edit2 = null; //TextField
public $Button2 = null; //Button
public $Edit3 = null; //TextField
public $Button3 = null; //Button
}
session_destroy(); //Browser reload initializes app
global $application;
global $Form1;
$Form1=new TForm1($application);
$Form1->loadResource(__FILE__);
$Form1->show();
?>
<script>
var xmlHttp;
function createHTTPrequest()
{
try //Firefox, Opera 8.0+, Safari
{
xmlHttp = new XMLHttpRequest();
}
catch (e1)
{
try //Newer IE
{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e2)
{
try //Older IE
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (e3)
{
alert("Your browser is too old and does not support AJAX!");
}
}
}
}
function defaultProcessStateChange()
{
if (xmlHttp.readyState == 4)
{
if (xmlHttp.status == 200)
{
eval(xmlHttp.responseText);
}
else
{
alert("There was a problem retrieving the requested data:\n" +
xmlHttp.statusText);
}
}
}
function doAjax(URL, processStateChange)
{
createHTTPrequest();
if (xmlHttp)
{
if (processStateChange)
{
xmlHttp.onreadystatechange = processStateChange;
}
else
{
xmlHttp.onreadystatechange = defaultProcessStateChange;
}
xmlHttp.open("GET", URL, true);
xmlHttp.send(null);
}
}
</script>
Luego he puesto dichos archivos en la carpeta htdocs de Apache y al intentar cargarla desde el explorador web de la forma:
http://localhost/project1.php obtengo lo siguiente:
Cita:
Warning: require_once(vcl/vcl.inc.php) [function.require-once]: failed to open stream: No such file or directory in C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\project1.php on line 8
Fatal error: require_once() [function.require]: Failed opening required 'vcl/vcl.inc.php' (include_path='.;C:\php5\pear') in C:\Archivos de programa\Apache Software Foundation\Apache2.2\htdocs\project1.php on line 8
|