Jump to content

[SOLVED] Directory references not working


cgcarpenter

Recommended Posts

I have a php script that does a directory list.  It calls a .inc file which has screen formatting information.  The .inc file references a css file.

 

Code from 'index.php':

<?php

include("/var/www/html/intranet.header.inc");

?>

...

 

Code from 'intranet.header.inc':

<head>

<link href="template_css.css" rel="stylesheet" type="text/css" />

</head>

 

<body class="page_bg">

  <div align="center">

  <table width="798" border="0" cellpadding="0" cellspacing="0" border="2" class="big_frame">

<tr>

  <td colspan="3">

<img src="images/top_bar.jpg" width="798" height="9" alt=""/>

...

 

This script is currently running perfectly on a RH 7.1 server with Apache 1.3 and PHP 4.x.  When I copied the files to a Fedora 6 server running Apache 2.x and PHP 5.x, it suddenly won't find the graphics or use the css file.

 

Directory structure:

Document root is /var/www/html

Location of non-working script: /var/www/html/authsvc

Location of intranet.header.inc and template_css.css:  /var/www/html

 

When I run the script from the /var/www/html folder, it works perfectly.  Just not when it is anywhere below that level.  I have tried putting the full path, from /var/www/html/ to http://192.168.0.113/var/www/html/, to no avail. 

 

One of the beauties of the script is the way it functions (at least on the old server).  I can put the 'index.php' into the authsvc folder, create a link on the Home page, and it will show the directory.  By clicking on a folder on that page, it will show the directory of the subdirectory, with all the formatting.  Running the 'index.php' that is in /var/www/html functions the same way.

 

I am just at a loss as to why it can't find the files and how to fix it.

 

Link to comment
Share on other sites

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.