Jump to content

zq29

Staff Alumni
  • Posts

    2,752
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by zq29

  1. I think I also have a copy of PHP and MySQL for Dummies lying around somewhere - That was the first and only book I bought on the subject, although, looking back on it, I'm not really a fan of the coding style and methods in the book. I have since developed my own coding style. Other than that book, I think I read through a few of the PHP Freaks tutorials and asked questions on these here forums. Once you have learnt the basics, the PHP Manual is an excellent source of help and information.
  2. As long as Microsoft bundle IE with Windows, it will never be a thing of the past I don't think. I wouldn't be as bothered if it was as standards complient as the Mozilla browsers, I'm fed up with designing for FireFox and then spending hours tweaking it so that it works in IE too...
  3. I dont understand 100%. Are you asking for someone to provide you with pre-written code, or are you asking for assistance on a script your are currently working on? I hope it's the latter, if not, post in our freelancing forum or check out a site like hotscripts.com or something.
  4. As easy as adding in the anchor tag.
    [code]<html>
    <head>
    <title>Listing 10.14 Listing the contents
    of a directory with readdir()</title>
    </head>
    <body>
      <?php
      $dirname = "./updates";
      $dh = opendir( $dirname ) or die("couldn't open directory");

    while ( ! ( ( $file = readdir( $dh ) ) === false ) ) {
      if ( is_dir( "$dirname/$file" ) )
        print " <a href='$dirname/$file'>$file</a> <br>";
    }
    closedir( $dh );
    ?>
    </body>
    </html>[/code]
  5. As far as I'm aware, you can do that if you configure your web server to process .htm files with the PHP interpreter.

    [quote author=onlyican link=topic=103976.msg414510#msg414510 date=1155386671]
    <% %> (I know this is known as ASP, but it works in PHP as well)
    <? ?> (Common used)
    <?= ?> (forgotten)
    [/quote]
    For the above three, I believe they need to be specifically enabled in your php.ini to be usable, not all servers have short tags enabled so they shouldn't be used commonly as you have annotated.
  6. If you're only doing simple searches like that, it would be more efficient to use strpos().

    [code]<?php
    $title_old = "The payment system is currently unavailable while
    we perform a system upgrade. Bringing these features back is
    our top priority, and we expect to have them restored shortly.";

    $title_new = "online";

    if(strpos($title_old,$title_new) !== false) {
        echo "Yeah, i saw it!";
    } else {
        echo "I can't see it!";
    }
    ?>[/code]
  7. [quote author=corbin link=topic=103818.msg413697#msg413697 date=1155284108]
    [quote author=redarrow link=topic=103818.msg413670#msg413670 date=1155281809]
    that why i done the survay becouse my company went bust lol

    a large browser company has also asared me that there browser wont be having nothink to do with javascript soon.

    they will only be support for flash.

    scary man.................
    [/quote]

    Hmmmm when ever you get back please tell me what browser company...
    [/quote]
    It's obviously not one of 'the big 3', they'd be shooting themselves in the foot big time. And also ONLY support Flash out of the box? All of the browsers that I know of require Flash to be installed as a plug-in, and allow a lot more support than just Flash. Someone is 'aving you on mate. Oh, and you can't use CSS to fully replace JavaScript.
  8. I don't believe this either, I think your figures are either the wrong way around, or your cross section of users were sourced on a JavaScript haters forum. You're saying that an estimated 90% of people that use the internet have disabled a piece of functionality in their browser that is switched on by default - I'd be supprised if 90% of the people that used the internet knew what JavaScript actually is... I also highly doubt that your company went bust because of the sole fact that you used JavaScript on your website.
  9. Its all to do with precedence, [b]&&[/b] and [b]||[/b] have a higher precedence than [b]AND[/b] and [b]OR[/b]. I see it like this...
    [code]<?php
    $a && $b OR $c; //Would be equal to ($a && $b) || $c;
    $a AND $b || $c; //Would be equal to $a && ($b || $c);
    $a && $b || $c; //Would be equal to ($a && $b) || $c;
    ?>[/code]
    I think it's easier just to use parenthesise...
  10. I develop on machines running both WinXP Pro and OS X, but my production servers are generally FreeBSD. I prefer any UNIX based OS on the production server over a Microsoft one, MS ones are just a pain in the arse to work with when you don't have CLI access to change file and directory permissions etc.

    Oh, I edited your poll to include FreeBSD :)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.