473,326 Members | 2,175 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Linking Structures

162 100+
I will use a local linking stucture to illustrate my questions. You can read the forum titled "File Organization and Aliasing" for a larger picture of what im trying to accomplish.

I have three folders living in /htdocs/ A(main site), B(admin), & C(shopping cart). Inside each folder are files that have at line 1, <?php include('es_starter.php') ?>. es_starter.php is in folder /htdocs/includes/, this file is manditory for the site to run. Since there are many starter.php files inside /includes/ i have added a site abbreviation to each (example.. *es_starter.php*). Each sites starter.php file is pathed by way of an updated *include_path* in php.ini.

*A* is the main folded used on all sites. Inside of *A* is index.php. It has links to /B/index.php and /C/index.php. My question is how to get /B/index.php to properly call its site name abbreviated version of starter.php.

I can not hard code in the site abbreviation because all files in /B/ and /C/ are supposed to be universal used by all domains. I have thought that i could set a $_COOKIE on /A/index.php

Expand|Select|Wrap|Line Numbers
  1. setcookie("site", "es", time()+60*60*24*1000, "/");
  2. include($_COOKIE[site]."_starter.php");
  3.  
that then gets read by all the other files, but deep linking will break this. I have also thought about reading the $_SERVER['SERVER_NAME'] variable then setting the abbreviation by that means but im not too sure. Any suggestions?
May 16 '06 #1
0 1353

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Steven T. Hatton | last post by:
Sorry about the big code dump. I tried to get it down to the minimum required to demonstrate the problem. Although this is all done with GNU, I believe the problem I'm having may be more general. ...
20
by: Steven T. Hatton | last post by:
I just read this in the description of how C++ is supposed to be implemented: "All external object and function references are resolved. Library components are linked to satisfy external...
0
by: JSwinney | last post by:
Greetings! I know this kind of question gets asked here almost daily, but as a newbie I have sort of a twist: I'm needing to take some reports I've written in Access that link to Btrieve files...
14
by: diskoduro | last post by:
Hi!! Years ago I built a database to control the production of a little factory. The users wanted to work in a Windows Net workgroup so I created an mdb with all the tables and data an after...
0
by: gasturbtec | last post by:
please help im new at access programming and i just got this project dropped in my lap because the old programmer quit. i've been doing ok so far but now i need to add code to an existing database...
3
by: Jason | last post by:
Hi, I am new to windows api programming and I wanted to create a little utility program for myself in c using the mini gw compiler. I bought petzold's book, programming windows 5th edition. I...
4
by: Rookie | last post by:
Hi, I needed some information on linking a C# application to a VC++ dll. How can this be done? It would be great if someone could give links to tutorials/articles on this subject. Thanks.
0
by: Drew | last post by:
I am attempting to clean up some code by breaking a large mixed-mode Managed C++ library into two. I cannot get the darn thing to compile or link (depending on what I do). I have two...
5
by: eberesche | last post by:
Hello, as a novice in ASN.1 I have me to a project in C ++ under use of ASN.1 - structures risquély. One of my colleagues means, this would deal something with masochism ;-). Result should be a DLL...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.