Reply to Re: php within dhtml, is that possible?

Your name:

Reply:


Posted by Jerry Stuckle on 05/11/06 16:00

Jacques Jamain wrote:
> hi Rik,
>
> Thu, 11 May 2006 01:49:25 +0200
> comp.lang.php -- "Rik" <luiheidsgoeroe@hotmail.com> écrivait (wrote):
>
>>Jacques Jamain wrote:
>>
>>>In the dhtml page, the
>>> generated statment <?php include('fspecs') ?>
>>> is ignored. I've the feeling that I'm overlooking something in the
>>> way php is parsing dhtml (if it does).
>>
>>What do you mean, generated statement? Is 'fspecs' a file, and do you
>>already include it while sending the page to the browser? How do you
>>generate it?
>>
>>The server side php can perform actions on the server, and output data to
>>browsers. With a few exceptions, it doesn't really care about what data,
>>that's your job as programmer. Sending HTML or JS is equal to sending pdf or
>>txt, it's just data... No checking for validity, no parsing.
>>
>
>
> 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?"
>
> Hope this clarify a few my situation.
> Thanks for your help and suggestions.
>
>
>>PHP can't be executed on the clients machine, so if you generate <?php
>>include('fspecs') ?> with javascript, it's just nonsense to your browser.
>>So, building client side PHP code has no use, except when sending it back to
>>the server and eval() it, which is a huge security risk.
>>
>
> ok, I agree
>
>
>>If it's generated on the server: echoing <?php //something ?> will not
>>execute it, look at eval().
>>
>
> It's the case, I've to look at this...
>
>
>>If it's generated on the clients machine: look at javascipts
>>XHTMLhttprequest() instead.
>>
>>If it's genuine PHP code on the server: what is the surrounding code, and
>>where does the file 'fspecs' reside?
>>
>
>
> this file is on the server
> thanks again
> Cheers

Jacques,

PHP should parse the contents of any file with a .php extension - even if it's
referenced by include(). So if you include('xyz.php') and in that file have
include('fspecs'), it should be processed just fine.

And btw - this isn't recursion.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация