I’ve been having a tough time figuring this out although for some reason I feel it should be easy to figure out even though I’m a beginner in PHP.
I uploaded a MySpace resource script to it’s own folder… /myspace
But when I go to the URL where it is…
********.com/myspace/index.php
The images aren’t showing up and some of the links are wrong. The images and links are missing the /myspace/ folder path.
I have tried several things which haven’t work out. For some reason I think it has something to do with thr ROOT_DIR settings in the config.php file.
I’ve included the config.php and indexs file below. Let me know if you need anything else.
config.php
[code]<?
// database param
define(‘DB_TYPE’, ‘******’);
define(‘DB_SERVER’, ‘******’);
define(‘DB_USER’, ‘******’);
define(‘DB_PASSWORD’, ‘******’);
define(‘DB_DATABASE’, ‘******’);
// set
define(‘HOMEPAGE’,‘http://******/myspace/’);
define(‘SITENAME’,‘Myspace Codes’);
define(‘SHOWPIMP’,‘ON’); //ON or OFF show left-top
define(‘ROOT_DIR’, realpath(dirname(FILE)));
define(‘MP3FLASHLIST_DIR’,ROOT_DIR."/uploads/playlist");
$mysql_server = DB_SERVER;
$mysql_user = DB_USER;
$mysql_pass = DB_PASSWORD;
$mysql_db = DB_DATABASE;
$strDBServer = $mysql_server;
$strDBUser = $mysql_user;
$strDBPass = $mysql_pass;
$strDBName = $mysql_db;
$strPath = $site_url;
$site_name = SITENAME;
$site_url = HOMEPAGE;
$strFPID = “******”;
$strFPName = "******
$strFPAge = “******”;
$strFPQuote = “******”;
$strFPImage = “******”;
?>[/code]
index.php
[code]<?
require_once(‘config.php’);
ob_start();
define(‘APPS’, ‘./apps’);
//define(‘VIEWS’, ‘./view’);
$app = !empty($_GET[‘app’]) ? strtolower($_GET[‘app’]) : ‘home’;
$action = !empty($_GET[‘action’]) ? strtolower($_GET[‘action’]) : ‘index’;
require_once APPS . “/$app/{$app}_entrance.php”;
require_once APPS . “/$app/$action.php”;
//@include VIEWS . “/$app/$action.html”;
$output_content = ob_get_clean();
$title .= ’ - MySpace Codes, MySpace Editor, MySpace Generators - '.SITENAME;
$desc .= " - We have MySpace Editors, MySpace Layouts, MySpace Codes, MySpace Generators and MySpace Graphics, Ultimate One stop MySpace Resource!";
require ‘./layouts/’ . ( @$layout ? $layout : ‘default’ ) . ‘.php’;
?>[/code]