在dhtml中的php,这可能吗? [英] php within dhtml, is that possible?

查看:55
本文介绍了在dhtml中的php,这可能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

在php生成的dhtml页面中我希望包含一个文件,实际上是dhtml页面的主体。我的托管ISP不允许SSI

但支持php包含。在dhtml页面中,生成的语句

<?php include(''fspecs'')?>

被忽略。我有一种感觉,我正在用php解析dhtml(如果有的话)的方式忽略了某些东西。保存在文件中的dhtml代码

之后正确执行...

有关此的任何提示吗?

提前致谢。


-

jj - Mercredi 10 Mai 2006 --- 23:14:59

解决方案

Jacques Jamain写道:

你好,
在php生成的dhtml页面中我想要包含一个实际上是dhtml页面主体的文件。我的托管ISP不允许SSI
但支持php包括。在dhtml页面中,生成的语句
<?php include(''fspecs'')?>
将被忽略。我觉得我在用php解析dhtml(如果有的话)的方式忽略了一些东西。保存在文件中的dhtml代码
之后正确执行...
有关此的任何提示吗?
提前致谢。




雅克,


你是什么意思忽略?


你看到页面的来源了吗?浏览器?

也许它就在那里,你看不到它。


否则,你必须得到一个错误,这不是被显示。打开

所有错误并显示它们以查看是否有任何错误。


-

====== ============

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


Jacques Jamain写道:

在dhtml页面中,
生成的语句<?php include(''fspecs'')?>
被忽略。我有一种感觉,我正在忽略某些事情,即php正在解析dhtml(如果有的话)。




你是什么意思,生成声明? ''fspecs''是一个文件,并且你在将页面发送到浏览器时已经包含了它吗?你如何生成它?


服务器端php可以在服务器上执行操作,并将数据输出到

浏览器。除了少数例外,它并不真正关心什么数据,

这是你作为程序员的工作。发送HTML或JS等于发送pdf或

txt,它只是数据...没有检查有效性,没有解析。


PHP不能在客户端机器上执行,所以如果你生成<?php

include(''fspecs'')?>使用javascript,这对你的浏览器来说只是胡说八道。

因此,构建客户端PHP代码是没有用的,除非将它发送回

服务器和eval ()它,这是一个巨大的安全风险。


如果它是在服务器上生成的:echoing<?php // something?>将不会执行它,请查看eval()。


如果它是在客户端计算机上生成的:请查看javascipts

XHTMLhttprequest()代替。


如果它是服务器上的真正的PHP代码:周围的代码是什么,并且

档案''fspecs''居住?


Grtz,

-

Rik Wasmus


嗨Jerry,

Wed,10 May 2006 17:58:54 -0400

comp.lang.php - Jerry Stuckle< js *******@attglobal.net> écrivait(已写):

Jacques Jamain写道:

你好,
在php生成的dhtml页面中我想要包含一个文件是
实际上是dhtml页面的正文。我的托管ISP不允许SSI
但支持php包括。在dhtml页面中,生成的语句
<?php include(''fspecs'')?>
将被忽略。我觉得我在用php解析dhtml(如果有的话)的方式忽略了一些东西。保存在文件中的dhtml代码
在此之后正确执行...
有关此的任何提示吗?
提前致谢。

Jacques,

你是什么意思忽略?



...'fspecs'中的预期代码不包括在内......

你有没有当它到达你的浏览器时查看页面的来源?
也许它就在那里而你看不到它。




yes ,<?php include(''fspecs'')?>在服务器端通过php生成了很好的生成

但是没有处理过现在很明显

对我来说它无法在客户端进行处理,太晚了.. 。

我的问题似乎是(或可能):如何强制php递归工作

无论如何,多亏了照顾......

度过了愉快的一天


-

jj - Jeudi 11 Mai 2006 --- 11:16:40


hello,
in a dhtml page generated from php I want to include a file which is
in fact the body of the dhtml page. My hosting ISP does not allow SSI
but supports php includes. 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). The dhtml code saved in a file
execute correctly after that...
Any hints about this?
Thanks in advance.

--
jj - Mercredi 10 Mai 2006 --- 23:14:59

解决方案

Jacques Jamain wrote:

hello,
in a dhtml page generated from php I want to include a file which is
in fact the body of the dhtml page. My hosting ISP does not allow SSI
but supports php includes. 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). The dhtml code saved in a file
execute correctly after that...
Any hints about this?
Thanks in advance.



Jacques,

What do you mean "ignored"?

Have you looked at the source for the page when it gets to your browser?
Perhaps it''s there and you don''t see it.

Otherwise, you must be getting an error which isn''t being displayed. Turn on
all errors and display them to see if there are any.

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


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.

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.

If it''s generated on the server: echoing <?php //something ?> will not
execute it, look at eval().

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?

Grtz,
--
Rik Wasmus


hi Jerry,
Wed, 10 May 2006 17:58:54 -0400
comp.lang.php -- Jerry Stuckle <js*******@attglobal.net> écrivait (wrote):

Jacques Jamain wrote:

hello,
in a dhtml page generated from php I want to include a file which is
in fact the body of the dhtml page. My hosting ISP does not allow SSI
but supports php includes. 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). The dhtml code saved in a file
execute correctly after that...
Any hints about this?
Thanks in advance.

Jacques,

What do you mean "ignored"?


... intended code in ''fspecs'' not included ...
Have you looked at the source for the page when it gets to your browser?
Perhaps it''s there and you don''t see it.



yes, the <?php include(''fspecs'') ?> statment is there, well generated
by php at server side but not processed and now it becomes obvious
to me that it cannot be processed at client side, too late...
My problem seems to be (or could be): "how to force php to work recursively"
Anyway thanks to take care...
had a good day

--
jj - Jeudi 11 Mai 2006 --- 11:16:40


这篇关于在dhtml中的php,这可能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆