RE: Define()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For starters, and in general, does anyone know why a view source would
not work in IE 6?  This hasn't worked for weeks, so I usually have to
use Mozilla to view the source.  
 
Anyway, Jim, this is my basic page setup.
 
<?php
include_once("../common/store_config.php");
include_once(HOME_DOC_ROOT."common/header.php");
?>
This is where my HTML codes goes.
So for example, a link to another page would look like this
<a href="<? echo DOC_HOME_ROOT ?>stuff/index.php">link</a>
 
a form would look like this
 
<form action="<? echo CTL_HOME_ROOT ?>" method="POST">
</form>
<?php
include_once(HOME_DOC_ROOT."common/footer.php");
?>
 
Note: within store_config.php I am declaring the constants along with
including some other files which I reference. For example, there is a
file called system_messages.php from which I pull "system messages" like
"Item was added to your cart", "Please enter in all the required
information", etc.
 
Currently I have the constant IMG_HOME_PATH set to
/killerspin/web/images/ and everything is fine.
 
For DOC_HOME_PATH I have /killerspin/web/store/ but I get all kinds of
errors like "could not create stream".
 
Specifically
 
Here is the code.
 
<?php
include_once("common/store_config.php");
include_once(DOC_HOME_PATH."common/header.php");
?>
<p class="content">This is the index page.</p>
<?php
include_once(DOC_HOME_PATH."common/footer.php");
?>
 
 and here is the output
 
Warning: main(/killerspin/web/store/common/header.php) [function.main
<http://www.php.net/function.main> ]: failed to create stream: No such
file or directory in D:\is\clients\killerspin\web\store\index.php on
line 3
 
So I replace the code with this, 
 
include_once("/killerspin/web/store/common/header.php");
 
Same thing happens, but if I put
 
include_once("http://localhost/killerspin/web/store/common/header.php";);
then it's fine BUT the images don't show and I haven't changed a thing
on the for IMG_HOME_PATH!!
 
So in summary, maybe my question should have started with
 
"How can I correctly use constants/variables to substitute for the
directory path so that I don't have to always include the entire path."
For example, in the event that my image directory changes or a directory
changes from login to register, then I don't want to have to go into
EVERY SINGLE  page and line of code to change it.
 
 
---> Jonathan
 
 
 

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux