Re: [SMARTY] Basic question

Monte Ohrt <[email protected]>
Newsgroups gmane.comp.php.smarty.general
Message-ID <[email protected]>
I think so, see the PHP docs.

Howler wrote:

>Monte,
>
>Thanks, is this something that I can turn off via ini_set()?
>
>
>Monte Ohrt wrote:
>
>  
>
>>A hunch, turn off PHP magic quotes?
>>
>>Howler wrote:
>>
>>    
>>
>>>Hello Everyone,
>>>
>>>I apologize in advance as I am sure that this question has been answered
>>>before. I have searched through mail lists and news groups and have not
>>>found a satifactory answer.
>>>
>>>I am still pretty new to PHP/Smarty so please be patient.
>>>
>>>I have installed Smarty to my Linux hosting server. I installed it
>>>outside of the www directory per the recommendations.
>>>/www
>>>       |_______>myappstuff
>>>       |_______>lib
>>>       .
>>>       .
>>>       .
>>>/Smarty
>>>          |_____> internals
>>>          |_____>plugins
>>>          |_____>myappstuff
>>>          |                     |________>cache
>>>          |                     |________>configs
>>>          |                     |________>templates
>>>          |                     |________>templates_c
>>>          |
>>>          |
>>>          |________________>Config_file.class.php
>>>          |________________>debug.tpl
>>>          |________________>Smarty.class.php
>>>          |________________>Smarty_Compiler.class.php
>>>
>>>
>>>I set the path using the ini_set and I can find the Smarty.class.php
>>>without issue, what seems to be the problem is that when my PHP code
>>>performs the $smSmarty->display('index.tpl');  I get the following
>>>error:
>>>
>>>=================
>>>
>>>*Warning*: Unexpected character in input: '\' (ASCII=92) state=1 in
>>>*/home/vomramha/smarty/Smarty_Compiler.class.php* on line *180*
>>>
>>>*Parse error*: parse error, unexpected ')', expecting ',' or ';' in
>>>*/home/myhomedir/smarty/Smarty_Compiler.class.php* on line *180*
>>>
>>>==================
>>>
>>>
>>>I believe that I have the permissions set correctly but I am not sure,
>>>it could be something that I missed in my code.
>>>
>>>==================
>>>
>>>
>>>index.php
>>>
>>><?php
>>>
>>>ini_set
>>>('include_path',".:/usr/lib/php:/usr/local/lib/php:/home/myhomedir/smarty");
>>>
>>>require_once ('Smarty.class.php');
>>>require_once ('lib/my_dbconnect.php');
>>>
>>>
>>>$smSmarty = new Smarty;
>>>
>>>$smSmarty->compile_check = true;
>>>$smSmarty->debugging = true;
>>>
>>>$smSmarty->template_dir = '/home/myhomedir/www/myappstuff/templates/';
>>>$smSmarty->compile_dir  = '/home/myhomedir/www/myappstuff/templates_c/';
>>>$smSmarty->cache_dir    = '/home/myhomedir/www/myappstuff/cache/';
>>>$smSmarty->config_dir   = '/home/myhomedir/www/myappstuff/configs/';
>>>$smSmarty->force_compile = true;
>>>
>>>$smSmarty->assign('Name', 'Joe');
>>>
>>>if ($smSmarty->template_exists('index.tpl'))
>>>{
>>>   if(!$smSmarty->is_cached('index.tpl'))
>>>     {
>>>     $smSmarty->display('index.tpl');
>>>     }
>>>}
>>>else
>>>{
>>>   $smSmarty->display('debug.tpl');
>>>   phpinfo();
>>>}
>>>?>
>>>
>>>index.tpl
>>>
>>>
>>><html>
>>><head>
>>><title>My Smarty test App</title>
>>></head>
>>>
>>><body>
>>>This is a test: {$Name}
>>></body>
>>></html>
>>>
>>>
>>>==================
>>>
>>>
>>>
>>>index.php does find the template and executes the correct code, however
>>>when the line:
>>>
>>>     $smSmarty->display('index.tpl');
>>>
>>>is executed I get the error.
>>>
>>>
>>>Any assistance would be greatly appreciated.
>>>
>>>Thanks in advance!
>>>John
>>>
>>> 
>>>
>>>      
>>>
>
>  
>

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.