PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » HTML » HTML_Template_PHPLIB » Bug #2510

run my index.php without rhyme or reason

Details

Submitted2004-10-12 01:16 UTC
Fromdonyad at 126 dot com
StatusBogus
PackageHTML_Template_PHPLIB
PHP Version4.3.8
OSWindowsXP
Roadmaps(Not assigned)

Comments

[2004-10-12 01:16 UTC] donyad at 126 dot com

Description:
------------
index1.php modifyed from example's block.php
if index1.php use tpl1.ihtml and original block.ihtml
it work well
but if i change block.ihtml to my block.ihtml's content
it will run my index.php in the same directory !
you can see that in index1.php i write "abc" into a "test.txt"
and in index.php i write "index" into "test.txt"
before that i use PEAR::ITX , it didnot have this problem

Reproduce code:
---------------
my block.ihtml

<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="200" height="80"><img name="logo" src="" width="200" height="60" alt="logo"></td>
<td> </td>
</tr>
<tr>
<td colspan="2" bgcolor="#f5f5f5"><img src="" width="1" height="3" alt=""></td>
</tr>
</table>

Expected result:
----------------
my index1.php

include_once '../PHPLIB.php';
$fp = fopen("test.txt", "a");
fputs($fp, "abc\r\n");
fclose($fp);
$t = & new Template_PHPLIB();
$t->setFile(array(
"main" => "tpl1.ihtml",
"block" => "block.ihtml"
));
$t->parse("CONTENT", "block");
$t->pparse("out", array("main"));

Actual result:
--------------
my index.php

$fp = fopen("test.txt", "a");
fputs($fp, "index\r\n");
fclose($fp);
echo "wakaka";

[2005-10-27 02:41 UTC] donyad at 126 dot com

this problem arises from my <img src=""> tag in html
when require this page, IE will access this document and my root document, e.g. index1.php - index.php
and Firefox will access this document twice.