You are here: Re: php within dhtml, is that possible? « PHP Programming Language « IT news, forums, messages
Re: php within dhtml, is that possible?

Posted by Jacques Jamain on 05/16/06 17:01

hi,
15 May 2006 22:33:31 -0700
comp.lang.php -- "RainCT" <rainbow2@eurion.net> écrivait (wrote):
>Hm..
>
><?php include('fspecs') ?>
>
>And the extension?
>
any extension, .php .htm .shtml ...
to clarify you can cut and paste to your server the following
and thanks to the kindness of your browser about html standards
you would see what I mean...
_______________________________________________________________________
<?php echo ' <html><head> <title>Hello</title></head>' . "\n";
$fdhtml= 'fn.php';
$finc = 'inc.php';
if (!$handle=fopen($fdhtml,'w+')){echo "Can't open file ($dhtml)";exit;}
if (!$handle_i=fopen($finc,'w+')){echo "Can't open file ($finc)";exit;}
$htmStuff =
'<body><h1>Hello</h1></body></html>'. "\n";
$incStuff =
'<?php include(\'fn.php\') ?><body><h1>Hello</h1></body></html>'. "\n";
if (fwrite($handle, $htmStuff) === FALSE)
{ echo "Cannot write to file ($fdhtml)"; exit;}
if (fwrite($handle_i, $incStuff) === FALSE)
{ echo "Cannot write to file ($finc)"; exit;}
fclose($handle); fclose($handle_i);
$inc = "<?php include('fn.php') ?><br>...include not included<br>";
echo $inc;
echo '<br><a href=fn.php>fn</a>';
echo '<br><a href=inc.php>inc</a><br>';
?>
_______________________________________________________________________

This write 2 files: fn.php and inc.php, echo an approximative dhtml and
intend to include on the fly fn.php, well echoed but not processed as
indicated in the title and in the rendered html.
In the dhtml, links to fn.php and inc.php are provided.
The link to inc.php shows that the php include is working on that server
when statically invoked...
If you are too far of your server you can try this link:
<http://jjamain.free.fr/samp.php>

HTH.
--
jj - Mardi 16 Mai 2006 --- 15:01:31

 

Navigation:

[Reply to this 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

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