|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi
Most likly being incredibly dumb here, I have 3 seperate files here connection.php - connection to mysql functions.php - odd functions find_records.php - finds all public records find_all_records.php - finds all nonpublic & public records in my www root there is connection.php - connection to mysql functions.php - odd functions find_records.php - finds all public records in the nonpublic dir there is connection.php find_all_records.php - finds all nonpublic & public records The problem is that both find_all_records.php &find_records.php include functions.php and within functions it includes connections.php so using include('connection.php'); would make the find_records work but the find_all_records would fail so using include('../connection.php'); would make the find_all_records work but the find_records would fail Any ideas? Cheers Dave |
|
#2
|
|||
|
|||
|
You know you can include more then one file right? So why not include both?
|
|
#3
|
|||
|
|||
|
Thanks for the reply
Hi
Many thanks for the reply, The idea suggest is a good one but it is still bit of a hack (I need this code to be quite tidy) but many thanks any how probably better than current solution which is to create two versions of connection.php root/connection.php and root/somedir/connection.php with root/somedir/connection.php referencing version of root/connection.php Many thanks any how DAave |
|
#4
|
|||
|
|||
|
What seems like another obvious solution would be to compund the files. Is this possible?
|
|
#5
|
|||
|
|||
|
im not sure what u'r getting ta :S can u explain different ?
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > PHP Development > PHP include relative links |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|