User Profile

Collapse

Profile Sidebar

Collapse
shreedhan
shreedhan
Last Activity: Sep 18 '10, 10:06 AM
Joined: Jul 30 '07
Location: Kathmandu, Nepal
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I guess you simply need to add

    echo $shorturl;

    at the end of your code in process.php.
    See more | Go to post

    Leave a comment:


  • shreedhan
    replied to problem in hosting site over LAN
    Yes, of course I can ping the server. The problem is it isn't working even on same server. If I open http://172.31.72.77 on same server, it won't work. But http://localhost does work.

    Thanks...
    See more | Go to post

    Leave a comment:


  • shreedhan
    started a topic problem in hosting site over LAN

    problem in hosting site over LAN

    Hi,
    I'm not sure whether this is the correct place to ask this question.
    I have installed easyphp 3.0 and hosted on my local computer. I needed it to host over a LAN. With easyphp I can see the site using http://localhost or http://127.0.0.1 only. I'm not able to view the site from anywhere else.
    My PC has an static IP 172.31.72.77. If I try to open this page http://172.31.72.77 in my own PC, then also it doesn't work. It says...
    See more | Go to post

  • Hi all,
    I'm writing again here because I think I figured out the problem (not the solution). Sorry for not being completely descriptive previously.

    I have two classes on same file . One of the methods in a class parses an XML file and returns String.
    This string is used in another method of another class to load an image.

    Now the code


    Code:
    class parse_Xml {
    	private Document
    ...
    See more | Go to post

    Leave a comment:


  • I tried this one as well. But its giving the same result..

    Thanks...
    See more | Go to post

    Leave a comment:


  • The code I'm using is following..


    Code:
    public BufferedImage loadimage(String name){
    		URL url=null;
    		try{
    
    
    			   System.out.println("name: "+name); 
    			   url=getClass().getClassLoader().getResource(name);     
    			   System.out.println(url); 
    			   url=getClass().getClassLoader().getResource("shreedhan.gif");   
    			   System.out.println(url);
    ...
    See more | Go to post

    Leave a comment:


  • Thanks for your reply

    I tried the above mentioned code and the output was

    Code:
    name: 
    abc.jpg
    
    null
    file:/home/Shreedhan/workspace/test_4_sep/bin/abc.jpg
    It shows "null" when "name" is there..
    and it shows full path when "abc.jpg" is there..

    I even tried concatenating the path to the name, but then it didn't work..

    ...
    See more | Go to post

    Leave a comment:


  • getClass().getClassLoader().getResource() problem....

    Hi,
    I'm very new to java... and I'm having a problem in getting a URL

    Code:
    URL url;
    url=getClass().getClassLoader().getResource(name);
    System.out.println(url);
    This code works well when I supply a filename "abc.jpg" directly instead of name. But if I get the filename in "name" string.. then, the returned url value is null.

    is there any difference in sending the argument...
    See more | Go to post

  • Thanks Garrow for the solution.
    I am now convinced that I can't get outside of /var/www/html (except using symlinks).
    See more | Go to post

    Leave a comment:


  • Hey,
    Thanks for clearing most of my doubts.
    But stll I have a doubt.




    I have created a directory /usr/tmp/uploads
    /usr has read and execute permissions for all
    tmp has read, write and execute permissions for owner, group and others all.
    and I have given read, write, and execute permission to the uploads directory as well.

    Even then it's not showing the image....
    See more | Go to post

    Leave a comment:


  • Thanks for replying. But, yeah, your question was somewhat stupid.
    Let me explain my problem.

    I'm using apache to host (locally) in my own PC (using fedora 6).

    I have a html file which includes an image. (plz remember I'm fully aware that I should give complete path of the image and I have done that)

    Now I can open this file in 2 ways.
    1. Just double click this file to view it in some browser...
    See more | Go to post

    Leave a comment:


  • Problem in including any file in html while hosting

    Hi all,

    First of all, I use linux (fedora 6) and apache to host
    I have a problem of including any file in html while hosting only
    Even a simple code like

    [HTML]<img src="/home/user/abc.jpg" />[/HTML]
    won't show the included image.

    To make it more clear,
    If I view same page just opening it (not hosting) like
    file:///home/user/abc.html
    It shows...
    See more | Go to post

  • shreedhan
    replied to BG Sound
    You can include this line

    [HTML]
    <head>
    <bgsound src="sth.mid" loop=-1 />
    </head>
    [/HTML]

    loop=-1 plays the sound forever. If you specify some number, the sound will be played that no. of times.

    Hope it will help you
    See more | Go to post

    Leave a comment:


  • shreedhan
    replied to Setting $_SESSION in PHP 5
    in PHP
    Have you included
    session_start() ;

    in another page or not?

    You need to start a session in another page as well.
    See more | Go to post

    Leave a comment:


  • shreedhan
    replied to problem in passing argument
    in PHP
    Hey,

    I didn't use $_GET['name'] to retrieve the value.
    Its working after I user $_GET array.

    thanks for all your help and support.
    I got that working now.

    Thanks again
    See more | Go to post

    Leave a comment:


  • shreedhan
    replied to Setting $_SESSION in PHP 5
    in PHP
    I think the problem is here




    You need to start a session in every page, even if you are just accessing previous values from the _SESSION array.

    So, initially a session will be started since $_SESSION is empty. But next time, $_SESSION array is set. So the code above doesn't start a session, if the array is set.

    How about trying just
    [PHP]session_start() ;[/PHP]
    ...
    See more | Go to post

    Leave a comment:


  • shreedhan
    replied to problem in passing argument
    in PHP
    Hi,
    thanks for your suggestions.

    I have tried printing the value of $val[0] as well and it's working fine.
    I can see in the page source as well as the url like pictures.php?na me=something but it seems name is not taking that value.
    later when I include
    [PHP]print ("\n<br/><center><img src=\" $name \"><br/>");[/PHP]
    name doesn't have any value.
    ...
    See more | Go to post

    Leave a comment:


  • shreedhan
    replied to problem in passing argument
    in PHP
    Well, I think I should explain my code.

    I am trying to make a page for pictures in which user will see thumnail-size pictures first. And when he clicks the picture, he will see the actual size of image later on the same page.

    Ok, now I have included this code in line no. 14
    [PHP]#
    printf("<a href=\"pictures .php?name=%s\"> ",urlencode($va l[0]));[/PHP]

    Isn't this suppose...
    See more | Go to post

    Leave a comment:


  • shreedhan
    replied to problem in passing argument
    in PHP
    OK,
    here is the code I'm using
    [PHP]<?php
    $loginid=$_SESS ION['loginid'];
    mysql_connect(' localhost','use r','user');
    mysql_select_db ('test');
    $query="select name from pictures where loginid='$login id'";
    $result=mysql_q uery($query);
    print("<table width=95% align=center cellspacing=4> <tr>");
    $count=0;
    while($val=mysq l_fetch_array($ result))
    ...
    See more | Go to post

    Leave a comment:


  • shreedhan
    replied to problem in passing argument
    in PHP
    I have included following line
    [PHP]print ("$name");[/PHP]
    in pictures.php
    just after above code.

    thanks...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...