# php code in tpl Datei

**URL:** <https://forum.shopware.com/t/php-code-in-tpl-datei/11442>\
**Category:** Shopware 3.5\
**Tags:** themes--design\
**Created:** [6. Februar 2013 um 16:37 UTC](https://forum.shopware.com/t/php-code-in-tpl-datei/11442 "2013-02-06T16:37:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rsielaff](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@rsielaff](https://forum.shopware.com/u/rsielaff)\
**Post date:** [6. Februar 2013 um 16:37 UTC](https://forum.shopware.com/t/php-code-in-tpl-datei/11442/1 "2013-02-06T16:37:45Z")

</div>

Hallo, ich würde gerne folgenden php code in einer tpl Datei ausführen lassen: $fh = fopen(“[http://xyz.de/cgi-bin/avail/avail.pl?CCD=DE&BNR=44&SKU=](http://xyz.de/cgi-bin/avail/avail.pl?CCD=DE&BNR=44&SKU=)”.$sArticle.ordernumber, “r”); $quantity .= fgets($fh); $quantity = trim($quantity); Irgendwie bekomme ich das aber nicht hin. Vielleicht hat ja jemand eine Idee. MfG Rüdiger
