Jump to content

[function.require]: failed to open stream:


drumhrd

Recommended Posts

Hello

 

I am getting the following error and I am not sure what's going on.

 

Warning: require(www/Smarty/Smarty.class.php) [function.require]: failed to open stream: No such file or directory in /var/www/myapp/smarty.php on line 4

 

Fatal error: require() [function.require]: Failed opening required 'www/Smarty/Smarty.class.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/myapp/smarty.php on line 4

 

 

I have the files in the directory as seen below

 

dev-station1:/var/www/Smarty$ ls

Config_File.class.php  internals  Smarty.class.php

debug.tpl              plugins    Smarty_Compiler.class.php

 

 

the script generating this error is

 

<?php

//Use the absolute path for Smarty.class.php

$base_path=basename(dirname(dirname(__FILE__)));

require($base_path.'/Smarty/Smarty.class.php');

$smarty = new Smarty();

$smarty->template_dir = $base_path.'/myapp/smarty/templates';

$smarty->compile_dir = $base_path.'/myapp/smarty/templates_c';

$smarty->cache_dir = $base_path.'/myapp/smarty/cache';

$smarty->config_dir = $base_path.'/myapp/smarty/configs';

?>

 

 

Any help would be great

 

thanks!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.