Jump to content

Recommended Posts

Ok, my index page loads up, but the images don't work and none of the links work. 

 

example) link points to http://localhost/register.php

 

but it should point to http://localhost/Greckle/register.php

 

the folder name is not being included in my links.

 

here is the code I have that should be taking care of that  its in a file called inc_set_root.php:

 

<?php
$path_set = "/";
$folder = ""; // set this to be "/folder" if the script is included in a folder
define("DOC_ROOT", $_SERVER['DOCUMENT_ROOT'] . $folder);
define("SITEURL", "http://" . $_SERVER['HTTP_HOST'] . "/" . $folder);
?>

 

 

in the index file I call this file using this code:

 

<?php 
session_start();
include("inc_set_root.php");
include("inc_connGreckle.php");
include("inc_global_functions.php");
include("inc_login_script.php");

 

that is the beginning of my index file.   

 

the site is in C:wamp\www\Greckle\

ok, I just set folder to "Greckle"; so now that piece of code looks like this:

 

<?php
$path_set = "/";
$folder = "Greckle"; // set this to be "/folder" if the script is included in a folder
define("DOC_ROOT", $_SERVER['DOCUMENT_ROOT'] . $folder);
define("SITEURL", "http://" . $_SERVER['HTTP_HOST'] . "/" . $folder);
?>

 

I exited wamp and restarted.  And the links still don't have the folder.  They still are like this:

 

http://localhost/register.php

 

instead of this: http://localhost/Greckle/register.php

 

 

ONEDIT:

 

nevermind....I just changed to:

 

$folder = "Greckle/";

 

the foward slash fixed it.  thanks again.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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