Page 1 of 1

access xampp/htdocs directory from remote computer

PostPosted: 09. May 2013 13:33
by anubhav
I have installed a xampp server in a computer A. now i want to access this xampp server from other computer B.i typed the ip address of the computer A ,where xampp server is installed , in the browser of computer B. i landed to the
Code: Select all
http://XX.XX.XX.XX/xampp
page. now i want to access the htdocs directory but i am not able to access it.i used this path.

Code: Select all
http://XX.XX.XX.XX/htdocs


and

Code: Select all
http://XX.XX.XX.XX/xampp/htdocs


I am getting error

Code: Select all
Object not found


Somebody please explain what i am doing wrong?

Re: access xampp/htdocs directory from remote computer

PostPosted: 09. May 2013 13:58
by Altrea
http://XX.XX.XX.XX/ already routes to the \xampp\htdocs\ folder.
It contains an index.php file which contains a redirect to the \xampp\htdocs\xampp\ ressources.

Re: access xampp/htdocs directory from remote computer

PostPosted: 09. May 2013 14:54
by anubhav
Altrea wrote:http://XX.XX.XX.XX/ already routes to the \xampp\htdocs\ folder.
It contains an index.php file which contains a redirect to the \xampp\htdocs\xampp\ ressources.



thank you so much . i didnt know this. i was trying this thing whole day . thank u once again :)

Re: access xampp/htdocs directory from remote computer

PostPosted: 09. May 2013 15:15
by anubhav
One more thing i want to ask now.

I accessed my client page using this link
http://XX.XX.XX.XX/project/client.php
.It has few lines of javascript and html but its not working at all . But when i access my client page using this link
http://localhost/project/client.php
, it works. I know something i should change in javascript code but i dont know what . So please tell me . Here is my client code :
Code: Select all
<html>
<head>


<style>
 
 #chatlog {width:440px; height:200px; border:1px solid;overflow:auto;}
  #userslog {width:440px; height:200px; border:1px solid;overflow:auto;}
 #msg {width:330px; height:100px;}
</style>

<script>



function initialize(){
  var host = "ws://localhost:12345/project/server3z.php";
  try{
    socket = new WebSocket(host);
    chatlog('WebSocket - status '+socket.readyState);
    socket.onopen    = function(event){chatlog("WebSocket status "+this.readyState); };
    socket.onmessage = function(event){ chatlog(event.data); };
    socket.onclose   = function(){ chatlog("WebSocket  status "+this.readyState); };
socket.onerror    = function(event){chatlog("Error :"+event.data); };
  }
  catch(err){ chatlog(err); }
 
}

function send()
{
  var chat;
 
  chat= document.getElementById("msg").value;
  if(!chat){ alert("Message can not be empty"); return; }
 
  try{ socket.send(chat); chatlog('Sent: '+chat); } catch(err){ log(err); }
  document.getElementById("msg").value = "";
}
function quit(){
  chatlog("closed!");
  socket.close();
  chatlog("WebSocket  status "+socket.readyState);

}



function chatlog(msg)
{
var match=msg.match(/10101010101010/g);
if(match)
{
var msg=msg.split("10101010101010");
document.getElementById("userslog").innerHTML+="<br>"+msg[0];
}
else
{
document.getElementById("chatlog").innerHTML+="<br>"+msg;
 }
 }
 
 function onkey(event){ if(event.keyCode==13){ send(); } }

</script>

</head>
<body onload="initialize()">
 <center>
 <div id="chatlog"></div>
 <input id="msg" type="textbox" onkeypress="onkey(event)"/>
 <button onclick="send()">Send</button>
 <button onclick="quit()">Stop</button>
 <div id="userslog"></div>
 </center>
</body>
</html>

Re: access xampp/htdocs directory from remote computer

PostPosted: 09. May 2013 15:47
by Altrea
we can't provide any support for third party scripts, sorry.

Re: access xampp/htdocs directory from remote computer

PostPosted: 09. May 2013 16:55
by anubhav
Altrea wrote:we can't provide any support for third party scripts, sorry.


ok :)