Re: XML and PHP

From: Date: Tue, 19 Feb 2002 18:32:58 +0000
Subject: Re: XML and PHP
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2751@lists.php.net to get a copy of this message
I did not getting any error messages at all, all I had was a blank screen, until I removed ./scripts now I get Warning: Failed opening 'menu_dis.php' for inclusion (include_path='.;c:\php\pear') in c:\program files\apache group\apache\htdocs\smarty\templates_c\f4\f4edc3e7d90fc7c3f919d60aee1bb7d4\d41d8cd98f00b204e9800998ecf8427e.php on line 11 I tried changing $trust_dir to an absolute path George At 12:20 19/02/2002 -0600, Monte Ohrt wrote:
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@wise
monk
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.experiment
almo
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/>http://www.phpinsider.c
om/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/


« previous php.smarty.general (#2751) next »