...

View Full Version : internal links...



GO ILLINI
01-07-2006, 02:29 AM
Will internal links work in php? like for an include? EG:


include("http://192.168.1.200/something.txt");

I have like 4 servers on my network and they are all paths after a domain but they have names(server1, serv...) and it would be alot easier to type include("http://server3/file.daf"); then some long path.
Also while writing this I came up with another question.
Say I have 2 servers(server1, and server2) Server 1 is on my network but server 2 is remotly hosted. I have an include on server2 that points to a file on server 1. That file is include.php In that file are includes to a dir on server 1.
My question is What is processed first? Will the dir be assumed to be on server1 or server2?
Sorry if I lost ya in that last one, and its not that important anyway, i was just wondering...

Thanks,
ILLINI

firepages
01-07-2006, 04:06 AM
include("http://192.168.1.200/something.txt");

would work assuming the computer @ .200 has a webserver running, note that you cant get the file source (of say php/perl etc) this way since the webserver will already have parsed them, to include php files for later processing you would want to access the network path \\network-server1\\files\\include.php

includes will be relative to the calling script , so if blah.php is on server4 then the script will look for relative paths on server4 , not 2 or 1 or 3 etc.

GO ILLINI
01-07-2006, 04:45 AM
ok thank you. I was just wondering, because I did it but have no way of testing it because the addresses would work for me anyway because they are on my network.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum