drumhrd Posted April 21, 2009 Share Posted April 21, 2009 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 https://forums.phpfreaks.com/topic/154990-functionrequire-failed-to-open-stream/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.