php readfile() function – how to implement on smarty web page – PHP

  php

Q(Question):

Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.

A(Answer):

K. wrote:

Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.

Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with
their support community.


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

A(Answer):

Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w wiadomosci
news:Ge******************************@comcast.com. ..

K. wrote:

>Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true)
?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.

Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with
their support community.

Unfortunately I did not ask on Smarty support forums.

M.

A(Answer):

Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w wiadomosci
news:Ge******************************@comcast.com. ..

K. wrote:

>Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.

Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with their
support community.

I have read on smarty forums

{php}

{/php}

M.

A(Answer):

On May 20, 11:00 am, "K." <halinaciern…@poczta.onet.plwrote:

Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.

The quick and easy (and therefore evil) way of doing it would be to
escape into PHP in your templates. Smarty supports executing raw PHP
statements in templates but it’s really not recommended. It’ll do for
quickly prototyping a feature though.

http://www.smarty.net/manual/en/lang…nction.php.php

Your best bet is to write a Smarty plugin that will fetch the data you
want and present it to your script as a variable.

http://www.smarty.net/manual/en/plugins.php
http://www.smarty.net/manual/en/plugins.functions.php

The eightball example on the latter page should demonstrate pretty
much everything you need to know.

A(Answer):

AD wrote:

>
Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w
wiadomosci news:Ge******************************@comcast.com. ..

>K. wrote:

>>Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’,
true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model +
Smarty.

Is it possible to implement below code:

<?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.

Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with
their support community.

I have read on smarty forums

{php}

{/php}

M.

So – did you try ASKING in their forums?


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

A(Answer):

Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w wiadomosci
news:P5******************************@comcast.com. ..

AD wrote:

>>
Uzytkownik "Jerry Stuckle" <js*******@attglobal.netnapisal w wiadomosci
news:Ge******************************@comcast.com …

>>K. wrote:
Hello!

I have a problem with using php on smarty web page

I would like to use a php code from this web page:

http://www.money.pl/webmaster/#

i.e.. <?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

which let me see currency courses on my web page.

The problem is that I have web page built up based on MVC model + Smarty.

Is it possible to implement below code:

<?php readfile (‘http://cw.money.pl/wiadomosci_banki.html’, true) ?>

on template file?

If so, please share your knowledge and write me how I could use it?

Thank you in advance for help
M.

Did you ask in the Smarty support forums?

When dealing with other products, you should almost always start with their
support community.

I have read on smarty forums

{php}

{/php}

M.

So – did you try ASKING in their forums?

No I found it on Polish smarty technology description

M.

LEAVE A COMMENT