note 91017 added to index
| From: | roland dot hentschel at t-online dot de | Date: | Thu, 21 May 2009 08:06:25 +0000 |
| Subject: | note 91017 added to index | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-155819@lists.php.net to get a copy of this message | ||
1.) scalable.php :
===========
<html>
<head>
<?php
$zf = $_REQUEST["zf"];
$css = file_get_contents($_REQUEST["css"]);
function scale($treffer) {
global $zf; return $treffer[1]*$zf;
}
$css = preg_replace_callback('#\[:(.*):\]#Uis', 'scale', $css);
echo "<style>\n".$css."\n</style>\n";
?>
</head>
<body>
<h1>Hallo Welt</h1>
<h2>wie geht's?</h2>
</body>
</html>
2.) scalable.tpl :
===========
h1 { font-size:[:16:]px; }
h2 { font-size:[:12:]px; }
3.) Implementation:
=======
http://localhost/.../scalable.php?css=scalable.tpl&zf=2
4.) PROBLEM
========
Would really like to implement this with
"include(...)"
or even better with
"<script src=...?css=...&zf=...></script>"
But just can' get it running.
Any idea?
Thx a lot in advance ( -: roland :- )
----
Server IP: 212.124.37.9
Probable Submitter: 62.224.110.11
----
Manual Page -- http://www.php.net/manual/en/index.php
Edit -- https://master.php.net/note/edit/91017
Del: integrated -- https://master.php.net/note/delete/91017/integrated
Del: useless -- https://master.php.net/note/delete/91017/useless
Del: bad code -- https://master.php.net/note/delete/91017/bad+code
Del: spam -- https://master.php.net/note/delete/91017/spam
Del: non-english -- https://master.php.net/note/delete/91017/non-english
Del: in docs -- https://master.php.net/note/delete/91017/in+docs
Del: other reasons-- https://master.php.net/note/delete/91017
Reject -- https://master.php.net/note/reject/91017
Search -- https://master.php.net/manage/user-notes.php