Web Hosting Talk







View Full Version : Argh ... Php ... Help


croakingtoad
01-04-2004, 10:27 PM
Hey, I designed a new layout for a site in a folder like this:

http://www.lewisgaleclinic.com/en/doctors.php

That version works fine, check it out.

Now, I backed up the directory structure one level like this:

http://www.lewisgaleclinic.com/doctors.php

That version, same file mind you, now does not work. Check it out. What in the world is the problem? I used relative file names so I wouldn't have this problem.

Here's the source:


<?php

include("./main/config.inc");

// Display the Physicians page (Practice Areas)

$sRootPath = '..';
require("$sRootPath/shared/cdbpracticeareas.php");
$PracticeAreas = new CDBPracticeAreas();

$dbconnect= "my.remote.sqlserver";
$user= "user";
$pass= "pass";
$keywords = "specialties, ";
$subtitle = "Clinical Specialties";

// Adds the html-head code to body tag
include("./main/head.inc");

// Adds the graphical header
include("./main/header.inc");

// Display the list of doctors
// Form parameters: SearchString (optional)

$sRootPath = '..';
require('cdisplaydoc.php');
require("$sRootPath/shared/cdbdoctors.php");

$Doctors = new CDBDoctors();

// Form Inputs
if ($_POST['SearchString']) // input via this form
{
$sSrchFor = $_POST['SearchString'];
}
else
{
$sSrchFor = '';
}

// Adds the main body
include ("./physicians/body.inc");

// Adds the footer
include("./main/footer.inc");

?>

croakingtoad
01-04-2004, 10:45 PM
Also, if you view the source, you'll notice that the formatting for the top is different:

lewisgaleclinic.com/en/doctors.php

<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>

lewisgaleclinic.com/doctors.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

It's the same friggin file calling the same other friggin files, I don't get it at ALL...esp. why it work work in one directory but not in another?!?!?!!?!?

:angry: :angry: :angry:

CreativeLogic
01-04-2004, 11:11 PM
Try changing this variable:
$sRootPath = '..';

To this:
$sRootPath = '.';

croakingtoad
01-05-2004, 09:30 AM
Nope, didn't work... ?

CreativeLogic
01-05-2004, 01:10 PM
Originally posted by whsox21
Try changing this variable:
$sRootPath = '..';

To this:
$sRootPath = '.';

Did you change the variable at both parts?

croakingtoad
01-05-2004, 01:15 PM
You got me...that was it.

Thanks for the help, I appreciate it!

CreativeLogic
01-05-2004, 02:14 PM
No problem...