eevan79 Posted July 2, 2010 Share Posted July 2, 2010 I have problems with one script. It's working fine on localhost but when I upload files its not working. In fact template will not work even though I set the paths to template files. I use simple script for templates: $tags = array( '{CATEGORY}', '{LAST_TOPIC}', '{TOPICS}',); $data = array( $l_category, $l_last_topic, $l_topics,); echo str_replace($tags, $data, file_get_contents($forum_url.'style/'.$default_style.'/categories.html')); when I use echo $forum_url.'style/'.$default_style.'/categories.html I can see path to template and when I use browser to navigate this path I see template layout, but template wont read.Only works fine when I test in localhost$forum_url and$default_style is set in config.php Then I tested and put template files in root and change path in script to template and its working. Why the script does not work when I put the template in subfolder ('root/style/template_name/') . $forum_url looks like this $forum_url = "http://mywebsite/script_is_here/"; I checked all '/' and paths, but still no working... Link to comment https://forums.phpfreaks.com/topic/206480-script-working-on-localhost-but-not-online/ Share on other sites More sharing options...
eevan79 Posted July 2, 2010 Author Share Posted July 2, 2010 Solved! Path should be: file_get_contents("./style/"... Link to comment https://forums.phpfreaks.com/topic/206480-script-working-on-localhost-but-not-online/#findComment-1080101 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.