Re: XML and PHP
| From: | Monte Ohrt | Date: | Tue, 19 Feb 2002 18:20:03 +0000 |
| Subject: | Re: XML and PHP | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2750@lists.php.net to get a copy of this message | ||
A couple of things. If you set $trusted_dir to "./scripts", then the
scripts directory must reside in the same directory as the executed
script (the one in the URL). Also, if scripts is your trusted directory
name, then you do not put the directory name in the include_php
pathname.
try this:
// in php script
$trusted_dir = './scripts';
// in template
{include_php file="menu_dis.php"}
if that doesn't work, then try an absolute path:
$trusted_dir = '/my/path/to/scripts';
btw, you should be getting error messages from Smarty saying it cannot
find menu_dis.php. Are you getting those?
chiefmonkey wrote:
>
> I have created a directory called scripts and added it the $trusted_dir =
> array('./scripts')
> I have added the quotes and got rid of the ./
> {include_php file="scripts/menu_dis.php"}
> but still nothing.
>
> At 11:57 19/02/2002 -0600, Monte Ohrt wrote:
> >Put quotes around the file attribute, and get rid of the ./
> >
> >{include_php file="menu_dis.php"}
> >
> >Then, be sure that menu_dis.php is located in your $trusted_dir
> >directory.
> >
> >chiefmonkey wrote:
> > >
> > > It's just a really simple template
> > >
> > > <html>
> > > <head>
> > > <title>{$TITLE}</title>
> > > <meta http-equiv="Content-Type" content="text/html;
> > > charset=iso-8859-1">
> > > </head>
> > > <body bgcolor="#FFFFFF" text="#000000">
> > > {include_php file=./menu_dis.php}
> > > </body>
> > > </html>
> > >
> > > George
> > >
> > > At 10:20 19/02/2002 -0700, Tara Johnson wrote:
> > >
> > > >Do you have a copy of the smarty template you are using?
> > > >
> > > >-----Original Message-----
> > > >From: chiefmonkey
> > >
> > > >>[<mailto:chiefmonkey@wisemonkeydesign.co.uk>mailto:chiefmonkey@wisemonk
> > eydesign.co.uk]
> > > >
> > > >Sent: Tuesday, February 19, 2002 10:18 AM
> > > >To: smarty@lists.ispi.net
> > > >Subject: [smarty] Re: XML and PHP
> > > >
> > > >
> > > > I am still struggling to get this to work, the PHP script parses an
> > > >XML file and the resullts are displayed, this works fine on it's own, but
> > > >as soon as I put it in Smarty it doesn't work.
> > > >
> > > > I have tried {php} {/php}
> > > >
> > > >and also include_php but nothing
> > > >
> > > >the two files can be found here
> > > >
> > >
> > > >><http://www.experimentalmonkey.co.uk/test.zip>http://www.experimentalmo
> > nkey.co.uk/test.zip
> > > >
> > > >
> > > >TIA
> > > >
> > > >George
> > > >
> > > >---
> > > >You are currently subscribed to smarty as: Tara.Johnson@DevelopOnline.com
> > > >To unsubscribe send a blank email to $subst('Email.Unsub')
> > > >Visit Smarty's homepage at
> > > ><http://www.phpinsider.com/php/code/Smarty/þ/DoSü è]
> > > >ë�6Ñ>http://www.phpinsider.com/p
> > hp/code/Smarty/
> > > >
> > > >---
> > > >You are currently subscribed to smarty as:
> > chiefmonkey@wisemonkeydesign.co.uk
> > > >To unsubscribe send a blank email to $subst('Email.Unsub')
> > > >Visit Smarty's homepage at
> > > >http://www.phpinsider.com/php/code/Smarty/
> > >
> > > ---
> > > You are currently subscribed to smarty as: monte@ispi.net
> > > To unsubscribe send a blank email to $subst('Email.Unsub')
> > > Visit Smarty's homepage at
> > > http://www.phpinsider.com/php/code/Smarty/
> >
> >--
> >Monte Ohrt <monte@ispi.net>
> >http://www.ispi.net/
> >
> >---
> >You are currently subscribed to smarty as: chiefmonkey@wisemonkeydesign.co.uk
> >To unsubscribe send a blank email to $subst('Email.Unsub')
> >Visit Smarty's homepage at
> >http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
http://www.ispi.net/