Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts

    internal links...

    Will internal links work in php? like for an include? EG:
    PHP Code:
    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
    Why not thank me?

    http://adamsworld.name

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    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.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    Regular Coder GO ILLINI's Avatar
    Join Date
    Jun 2005
    Location
    USA
    Posts
    634
    Thanks
    0
    Thanked 7 Times in 7 Posts
    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.
    Why not thank me?

    http://adamsworld.name


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •