I have a structure something like index.php (includes the header) includes/header.php (Includes the billing config file) billing/accounts/config.php caseStudies/example.php (includes the header) The problem now is that the case study file is including the header and then the billing config file is trying to be included within that page. However it can't find it because it would require to backtrack like ../billing/accounts/config.php but it isn't. However if I change the path to ../ then the config wont be included on pages within the root directory.
Articles similar to PHP Include directory change problem:
Include Looks in Two Locations?
My root/index.php includes root/Pages/home.php, which has the following statement:
include("header.php");
The functionality of this include varies. If there's a file located at root/header.php, that's the file that gets included. Otherwise, it loads root/Pages/header.php, which is what I would expect to be the default behavior.
Can anyone explain what's going on? I didn't see any clear explanation in the documentation, but I can imagine it's because the executed file (index.php) is in root rather than Pages.
Also, I suppose this means I take a tiny efficiency hit if I don't use the full path?
Thanks,
e39m5[Help] .php File Uploader File Size Error
When ever I change the max file size in config Inothing happens it still says 2mb
the config and the index are in the attachments.
please help me fix this problem....
NO LEECHIN
Attached Files
Index.txt (18.4 KB)
Config.txt (3.0 KB)
IIS7: Problem with web.config and xml file
Hi,
First of all i would like to tell you the scenario.
I am using a Rewrite rules for my application. I have added a web.config file on my project root and the application is working fine. But, my administrator section which is in sub folder is not working. When i access the www.abc.com/administrator it shows me page not found error. I have copied the same web.config file and put it on the administrator section it is not working for that either. Means i got 404 Not found message in both cases i.e. putting web.config in adminstrator folder and without putting web.config in administrator folder. Its seems that for sub folder web.config is disabled???? Because it is fetching the root's web.config no matter i add web.config in administrator folder or not.Configuring web.config File In IIS 7
In this first installment of performance tuning tricks for ASP.NET and IIS 7 we will look at some of the easy, yet powerful possibilities in the web.config file. By taking advantage of these few tricks we can increase the performance of any new or existing website without changing anything but the web.config file.
The following XML snippets must be placed in the <system.webServer> section of the web.config.
HTTP compression
You’ve always been able to perform HTTP compression in ASP.NET by using third-party libraries or own custom built ones. With IIS 7 you can now throw that away and utilize the build-in compression available from the web.config. Add the following line to enable HTTP compression:Drop Down Boxes from Directory Scan
I have a directory structure that is constantly being updated.
Config (Root)
--City (Sub-Dir)
----Address (Sub-Dir)
------File
I'm trying to create a script that will:
1. Scan a directory (will be a root dir) and place the directory names in a drop down box.
2. Choose option (dir) and a 2nd box will appear with subdirectores
3. Once you select an option, a 3rd will be presented
4. This directory will have 1 file that needs to be downloaded
[code]
<?php
$dir = "D9034-Configs";
if (isset($_GET['Site'])) { $Site = $_GET['Site']; } else { $Site = $_POST['Site']; }Problem Inserting html into element by javascript
Hi!
I'm trying to make a script (i'm a bit of a JS newb) which is called every time a change is made to an input box and will show an image either a tick/check or a cross depending on whether the values of two total boxes match. The script looks right to me but the image doesn't show. Can somebody perhaps look through it and let me know where I'm going wrong?
Cheers!
HTML Code:
<?php include 'includes/config.inc.php'; ?>
<html>
<head>
<link href="includes/accounts.css" type="text/css" rel="stylesheet" />
<script>
<!-- FORCE TWO DECIMAL PLACES TO CURRENCY -->
function dp(price) {cPanel, shared host, $_SERVER vars -- determng the root path?
I'm using a php file to store host specific configurations (config include). I'm having trouble setting up the the root path for a shared host server. After reading this I'd like to hear a comment on how the root path using $_SERVER vars is resolved on shared hosts.
This is an excerpt of my includes file...
PHP Code:
$liveUrl = "http://".$_SERVER['HTTP_HOST']."/~justtemp/test_site/".$liveDir;
$siteRoot = $_SERVER['DOCUMENT_ROOT']."/~justtemp/test_site/";
$includesPath = $siteRoot."_includes/";
This is what I'm getting from print $siteRoot;
/usr/local/apache/htdocs/home/justtemp/public_html/
As you can see the var $_SERVER['DOCUMENT_ROOT'] produces this,
