www.webdeveloper.com
Results 1 to 10 of 10

Thread: Yet another newbie question

  1. #1
    Join Date
    Jan 2003
    Posts
    2

    Question Yet another newbie question

    I'm trying to set up a webpage using SSI but my current server doesn't allow it (yes, I have talked to their technical support about it). Is there another way of including another file using some other method like JavaScript, CGI or HTML? What about a client side method?

    Thanks for you help!
    Last edited by moxy; 01-08-2003 at 10:13 PM.

  2. #2
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    If your server has PHP enabled there is a simple way to do it.


    PHP Code:
    <?PHP
    include("test.htm");
    ?>

  3. #3
    Join Date
    Jan 2003
    Posts
    2
    Worked like a charm! Thank-you so much Pyro.

    I guess it's simple if you know what you're doing

  4. #4
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Glad it worked for you. I like using PHP so much more than SSI or even Perl. It is a very powerful scripting language. And, well supported.

  5. #5
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    pyro
    I like using PHP so much more than SSI or even Perl
    SSI obviously isn't comparable to either, but I'm curious why you would consider PHP better than Perl?
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  6. #6
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    No, no, I didn't mean that SSI was compairable. What I meant was I would use a PHP include before a SSI include.

    Originally posted by jeffmott
    but I'm curious why you would consider PHP better than Perl?
    I guess it is mostly because to me, PHP seems easier. Perl gives you a pretty generaic error message. Internal Server Error can mean just about anything... PHP tells you what line the problem was on. Also, you don't have to CHMOD PHP (except some file/directories, if you are going to be writing to them) so that makes it easier. Also, I like how easy it is to incorporate into HTML. You can basically just mix it all together. I do realize that Perl has it's upsides, too. And the biggest would be that it is a full fledged programming language. All in all though, I do like PHP better, but that is just me....

  7. #7
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    pyro
    I guess it is mostly because to me, PHP seems easier
    Have you taken the time to truly learn Perl? Any language (not just Perl) will seem difficult until you learn it.

    pyro
    Perl gives you a pretty generaic error message. Internal Server Error can mean just about anything
    That's because "Internal Server Error" isn't perl's error message; it's the server's. The real error message is stored in the server error log. But if you don't want check that, then there is a simple statement that will display the perl error rather than the server error.

    use CGI::Carp 'fatalsToBrowser';

    pyro
    Also, you don't have to CHMOD PHP (except some file/directories, if you are going to be writing to them)
    Again, this isn't Perl. File permissions is an aspect of unix. Usually Perl don't need changed permissions any more than PHP, except for perhaps making the script itself executable if the server hasn't done that already automatically.

    pyro
    Also, I like how easy it is to incorporate into HTML. You can basically just mix it all together
    As can Perl (http://perl.apache.org/embperl/). I think you may find that PHP's advantages over Perl are in fact misconceptions.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  8. #8
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Originally posted by jeffmott
    Have you taken the time to truly learn Perl?
    No, not really. You can do most of the same things with PHP, so for now, I'd rather spend my time learning things that aren't so close to each other. Also, they syntax between PHP and Perl is very close. I think it should be quite easy to go from one to the other.

    Originally posted by jeffmott
    use CGI::Carp 'fatalsToBrowser';
    Do you just put this in you script? That would be quite nice. Also, I have used a Perl checker in the past, and that was helpful as well.

    Originally posted by jeffmott
    I think you may find that PHP's advantages over Perl are in fact misconceptions.
    Seeing how the languages are so close, I guess one would just have to decide which he would rather learn. For me, that was PHP.

  9. #9
    Join Date
    Nov 2002
    Location
    NY, USA
    Posts
    731
    pyro
    Do you just put this in you script?
    Yup.
    for(split(//,'))*))91:+9.*4:1A1+9,1))2*:..)))2*:31.-1)4131)1))2*:3)"'))
    {for(ord){$i+=$_&7;grep(vec($s,$i++,1)=1,1..($_>>3)-4);}}print"$s\n";

  10. #10
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Thanks... I'll have to remember that if I try anything in Perl.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles