上传到服务器时,包含文件中的代码不会执行

I have this code in profile.php:

$table_to_paginate  = 'updates';
$posts_per_page = 5;
require_once ("pagination/start_pagination.php");

$query  = "SELECT * FROM updates ";
$query .= " ORDER BY id DESC ";
$query .= " LIMIT {$start}, {$posts_per_page}";

In the included file ie 'pagination/start_pagination.php' i have these codes:

//max displayed per page
            $per_page = $posts_per_page;
            //get start variable
            if(isset($_GET['start'])) {
            $start = $_GET['start'];
            }
            //count records
            if(!isset($additional_info)){$additional_info = NULL;}
            $counting = "SELECT * FROM {$table_to_paginate}";
            $counting .= "{$additional_info}";
            $record_count = mysql_num_rows(mysql_query($counting));
            //count max pages
            $max_pages = $record_count / $per_page; //may come out as decimal
            if (!isset($start)) {
                if(isset($upsidedown)){
                    if($record_count - $per_page < 0 ){ $start = 0;} else {$start = $record_count - $per_page;}
                } else {
                 $start = 0;
            }
            }

The problem is, the include can find the file, but it doesn't provide the variables from the included file so that i can use it in profile.php. Something funny is that, It works with localhost but when i upload it to the servers it doesn't work.

additional info: I need the $start from the included file.

You'll need to access the variable via the $GLOBALS array if you want to use it across file boundaries:

// in profile.php
$query .= " LIMIT {$GLOBALS['start']}, {$posts_per_page}";

// in start_pagination.php
$per_page = $GLOBALS['posts_per_page'];
// ... snip
$counting = "SELECT * FROM {$GLOBALS['table_to_paginate']}";