where do I put hidden files / directories?

where do I put hidden files / directories?

Posted by: listenlight
Posted on: 2006-06-27 08:34:00

I want to upload some java classes, and access / run them from the page, but I don't want the visitor to see the different directories or files? Where do I put them? Say if I have a text area and submit button, but button runs the text through my java applications and returns a new page, how do I make it so the visitor sees only the text area page and the returned page? thx :)

Re: where do I put hidden files / directories?

Posted by: guice
Posted on: 2006-06-27 08:50:00

In your home directory, anywhere but your domain directory.

Re: where do I put hidden files / directories?

Posted by: listenlight
Posted on: 2006-06-27 08:53:00

how do I get to my home directory?

Re: where do I put hidden files / directories?

Posted by: listenlight
Posted on: 2006-06-27 08:57:00

when i start up FireFTP in Firefox, it starts out at "/" then I have to chage down to my domain for the files I want to be seen. Is the "/" my home directory?

Re: where do I put hidden files / directories?

Posted by: scjessey
Posted on: 2006-06-27 09:12:00

In reply to:

Is the "/" my home directory?


It depends on context. To a web browser, "/" represents your web root directory. It acts in the same way as http://domain.com/.

From the perspective of PHP, however, "/" means something different. It is referring to the absolute path (also called relative from root). On a Windows system, that would be the same as "C:", but on the Linux system used by DreamHost it means the root directory.

If you were trying to "include" a file from a directory called "includes" in your web root, with PHP for example, you might try to do it like this:

<?php include("/includes/file.php"); ?>

That doesn't work, because it is using the wrong "/" as a reference. Instead, you would need something like this:

<?php include("/home/username/domain.com/includes/file.php"); ?>

In fact, it would be better to do it like this:

<?php include($_SERVER['DOCUMENT_ROOT']."/includes/file.php"); ?>

That is because $_SERVER['DOCUMENT_ROOT'] is a special environment variable that holds the absolute path to your web root. It is always available on Apache systems, and it means that you can safely move your site around from one host to another without worrying about differing file structures.

Re: where do I put hidden files / directories?

Posted by: listenlight
Posted on: 2006-06-27 09:18:00

well, it's still unclear. I mean when i log into my ftp account, the remote setting is "/" and then underneath is my domain, along with logs and Maildir. So is that initial "/" FireFtp's shorthand for my /home/username directory? and is this the directory that I can install the files/pages/services that the visitors won't be able to access? thx

Re: where do I put hidden files / directories?

Posted by: listenlight
Posted on: 2006-06-27 09:19:00

and to clarify, FireFTP is not exactly a web browser, it's an extension to firefox. it just runs in a new tab, that's all. thanks again

Re: where do I put hidden files / directories?

Posted by: scjessey
Posted on: 2006-06-27 09:28:00

In reply to:

well, it's still unclear


Sorry.

In reply to:

and to clarify, FireFTP is not exactly a web browser, it's an extension to firefox. it just runs in a new tab, that's all.


Yes, I have used FireFTP. Like all FTP clients, FireFTP will connect you to your personal directory. In otherwords, it connects you to:

/home/username/

You cannot access "/home/", but you can certainly put files in your personal directory that will not be visible to the outside world. So you can always create a directory in there called "hidden", which your scripts (and only your scripts) can access with:

/home/username/hidden/

Does that answer your question?

Re: where do I put hidden files / directories?

Posted by: listenlight
Posted on: 2006-06-27 09:35:00

but wait, do i have to call it "hidden/" to keep it hidden? or does anything I put in there can only be accessed by my own scripts? thx so much, you're the best :)

Re: where do I put hidden files / directories?

Posted by: listenlight
Posted on: 2006-06-27 09:38:00

i'm trying to emply google's api, i just uploaded /soap/com/google/soap/search directory with several files? Would you give me some php help? say I have a text box and submit button. what is a line of code that would send the text to the applicable class in the above directory, run the java class, and return a simple "working" test line back to the viewer? I'll get started on it, maybe I can figure it out for myself..

Re: where do I put hidden files / directories?

Posted by: scjessey
Posted on: 2006-06-27 10:37:00

In reply to:

but wait, do i have to call it "hidden/" to keep it hidden?


Nope. The folder can be called "ooohh_you_cannot_see_me" if that is your desire.

Re: where do I put hidden files / directories?

Posted by: scjessey
Posted on: 2006-06-27 10:40:00

In reply to:

i'm trying to emply google's api, i just uploaded /soap/com/google/soap/search directory with several files? Would you give me some php help? say I have a text box and submit button. what is a line of code that would send the text to the applicable class in the above directory, run the java class, and return a simple "working" test line back to the viewer? I'll get started on it, maybe I can figure it out for myself..


I have absolutely zero knowledge of Java; however, the DreamHost wiki has a handy PHP tutorial, which can be combined with the PHP form processing tutorial to get the information you need.

Re: where do I put hidden files / directories?

Posted by: guice
Posted on: 2006-06-27 11:41:00

In reply to:

when i start up FireFTP in Firefox, it starts out at "/" then I have to chage down to my domain for the files I want to be seen. Is the "/" my home directory?


In the context you're thinking, yes.

However, as I'm sure was stated earlier, on standard unix "/" is the root file system. Your home would technically be /home/<user> where <user> is your FTP login name.

There is just a wrapper (known as chroot for unix folks) that makes your FTP client think / is home when in reality it is /home/<user>/

Re: where do I put hidden files / directories?

Posted by: listenlight
Posted on: 2006-06-27 11:42:00

you're the best. hopefully one day i can aim some business your way.

Re: where do I put hidden files / directories?

Posted by: guice
Posted on: 2006-06-27 11:45:00

In reply to:

i'm trying to emply google's api, i just uploaded /soap/com/google/soap/search directory with several files? Would you give me some php help? say I have a text box and submit button. what is a line of code that would send the text to the applicable class in the above directory, run the java class, and return a simple "working" test line back to the viewer? I'll get started on it, maybe I can figure it out for myself..


Google's API files is Java?

I can tell you right now, you cannot run Java web files on the DreamHost servers. That requires a JSP Server, which there is none running (Tomcat if you've herd of it).

I thought Google's API was merely a SOAP interface, accessible by any language with SOAP libraries. I think you're going off onto the wrong path here.

Re: where do I put hidden files / directories?

Posted by: listenlight
Posted on: 2006-06-27 11:47:00

well, the DH files say "no J EE" but that applets and regular java are fine. what i want to do is send data as arguments to a java application which will filter the results back to the page somehow... I cant do that?

Re: where do I put hidden files / directories?

Posted by: guice
Posted on: 2006-06-27 11:55:00

In reply to:

well, the DH files say "no J EE" but that applets and regular java are fine. what i want to do is send data as arguments to a java application which will filter the results back to the page somehow... I cant do that?


If the Java Application is built to be ran on the command line with arguments, you can do that. I thought you were wanting to run some Java server request, which you cannot. DH doesn't have any Java servers running. But the Java client is fully functional. It's version 1.5.0_02b9 in case you wanted to know.

Tags: directoriessubmit buttonthxuploadaccesshidden files