|
Posted by Jacques Jamain on 05/11/06 16:47
Rik,
Thu, 11 May 2006 12:29:21 +0200
comp.lang.php -- "Rik" <luiheidsgoeroe@hotmail.com> écrivait (wrote):
>Jacques Jamain wrote:
>> ok, I have to explain a bit more what I intend to obtain.
>> At server side I generate an html file to include some data obtained
>> from mysql, to be passed to JS. This is done by echoing the html
>> head and the JS directives and the data with php. It's ok, and now
>> I have to add the html body and I was thinking that instead of
>> echoing all the html directives it would be nice to include a file
>> holding all those directives. That's SSI, but helas my hosting isp
>> does not support, hence the tentative with php.
>> The actual question: "is recursion possible with php and if yes
>> how?"
>
>I still don't really get what you are trying to do:
>You have some data retrieved from the database, and after that you want a
>HTML body...
>Why not just end parsing with php (?>), and write the HTML? Echoing is nog
>necessary. I think I'm missing something here.
>
>The HTML body, is it dynamic, and if so, how do you control that: php or
>client side js?
>
>Am I to understand that a simple:
>include("your/desired/file.html");
>does not work?
well, think to a quiz. At the server the Q&A are in mysql. The client
invokes that quiz as www.mysite.com. At mysite there is an index.php
which read the db, and build a dhtml set with all the things, JS data,
JS source and html body allowing to call the JS functions presenting
the quiz to the client and handling its answers. The data, the JS and
the html body are on the server. There is no problem echoing the data
and the html head directives including the JS source. My problem is to
include the html body file using php code in the index.php.
The interesting effect is that, if I save the dhtml echoed with the
<?php include('fspecs') ?> inside at client side and then I transfer
that file as is to the server I get exactly what I want.
If SSI was enabled the method would be to echo:
<!-- #include virtual=\"fspecs\" -->
instead
am I doing something wrong?
thanks
--
jj - Jeudi 11 Mai 2006 --- 14:47:39
Navigation:
[Reply to this message]
|