Jump to content

rruff

Members
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About rruff

  • Rank
    New To The Neighborhood
  1. Directory/file Locations

    It goes under www. Rob
  2. Directory/file Locations

    You can't really hide JavaScript code from the viewers of your site. The code is executed by the web browser, so it has to be downloaded to their machine. Even if you could keep them from viewing the .js file on the server, they could always pull it out of the browser cache and look at it. The best place to put JS include files in either in your public_html or a subdirectoy of public_html. PHP include files should definitely be kept in a directoy that is not publicly viewable; i.e., outside of public_html. Since PHP runs on the server, and can access files on the server, allowing people to view your PHP code can pose a security risk. You could create a directory for your PHP include files at the same level as public_html. For example, /home/user_name/php. Then put a line like this in your .htaccess file: >php_value include_path .:/home/user_name/php This adds the directory to PHP's include path, so you don't have to reference the file by it's absolute path. Take a look at the PHP Manual for more information. HTH Rob
  3. Wysiwyg

    While I think WYSIWYG HTML tools are fine, it really is beneficial to actually learn HTML before you start using such a tool. One often has to tweakthe HTML generated by these tools in order to get the desired results, and in order to do this, one must understand what is going on "under the hood", so to speak. I personally recommend HTML & XHTML: The Definitive Guide; I found it quite handy when I was first learning this stuff.
  4. Ssi And Cgi Questions

    I'm not sure why your script won't run without including CGI::Carp(fatalsToBrowser). I created a simple test script that ran fine without it. Could you post your code so we can see exactly what's going on?
  5. Css Layout

    Here's an interesting article about using CSS to control web site layout, instead of the usual table method: http://www.oreillynet.com/pub/a/javascript...css_layout.html
  6. Ssi And Cgi Questions

    I'm guessing that SNH has the SSI exec directive disabled, as it is a security risk. However, one can achieve similar results with the include directive. For example, create a CGI script to run the ls command: #!/bin/sh echo "Content-type: text/html" echo "" echo "" ls Put this directive in your .shtml file: <!--#include virtual="cgi-bin/script.sh" --> As for your second question, use CGI::Carp qw(fatalsToBrowser) is used to send error messages to the web browser for testing and debugging. What exactly happens when you try to run the script without this? Rob
×