Jump to content

Script working on localhost, but not online


eevan79

Recommended Posts

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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.