| | |
Including External Files
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2008
Posts: 46
Reputation:
Solved Threads: 0
Hi there.
I'm having a small issue with including various files into some of my main files. This issue started when I decided to organize my directory structure.
My old structure:
My new structure (changes highlighted in red):
Examples 1 & 2 are not working for me. Am I doing anything wrong with the URLs?
I'm having a small issue with including various files into some of my main files. This issue started when I decided to organize my directory structure.
My old structure:
PHP Syntax (Toggle Plain Text)
/{root} [application] [css] [FF] [images] [install] [js] [validation] So in this structure, FF (Firefox) is where the main application files are. So if I wanted to access "common.css" in the [css] folder, the source URL would be "../css/common.css"
My new structure (changes highlighted in red):
/{root}
[application]
[FF]
[css]
[images]
[install]
[js]
[validation]
Example #1
This is where things get weird. Say I want to access the same file (common.css) from FF. The url would now be "./css/common.css" right?
Example #2
Also, say I want to access "tabClick.js" in the [js] directory from the [install] directory. The url would then be "../../js/tabClick.js" correct?Examples 1 & 2 are not working for me. Am I doing anything wrong with the URLs?
•
•
Join Date: May 2008
Posts: 252
Reputation:
Solved Threads: 20
No because ../ is up ONE DIR and ./ is same DIR
My Blog, Life and everything that matters to me - SamRudge.co.uk
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
2x Macbook Pro's, 1x Mac Pro, 1x iMac, 2x Macbook's running Fedora linux - In conclusion, I hate windows =)
![]() |
Similar Threads
- Execute external files via event handlers (JavaScript / DHTML / AJAX)
- Calling external files (C++)
- Including external files in the program (C++)
- Can't open any xml file (PHP)
Other Threads in the PHP Forum
- Previous Thread: Mysql statement is throwing error.. why?
- Next Thread: Rank mysql search results by coulmn weighting
| Thread Tools | Search this Thread |
# 5.2.10 ajax apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date display dissertation dynamic echo echo$_get[x]changingitintovariable... email error file files folder form forms function functions google href htaccess html image images include insert integration ip java javascript joomla ldap legislation limit link local login loop mail memberships menu mlm multiple mysql mysqlquery oop open paypal pdf persist php problem query radio random recursion regex remote rss script search server sessions sms soap sockets source space spam sql syntax system table tutorial update upload url validation validator variable video web xml youtube





