dcsimg
www.webdeveloper.com

Search:

Type: Posts; User: NogDog

Page 1 of 20 1 2 3 4

Search: Search took 0.30 seconds.

  1. So we know that the file_get_contents() call...

    So we know that the file_get_contents() call failed. You might want to turn all all error reporting.


    <?php
    error_reporting(E_ALL);
    ini_set('display_errors', true); // set to false for...
  2. Thread: Security In Php

    by NogDog
    Replies
    3
    Views
    260

    Since you are using mysqli (glad you're not using...

    Since you are using mysqli (glad you're not using the old mysql extension), I'd like to see you use prepared statements with bound parameters, which would then take care of any/all worries about SQL...
  3. Replies
    5
    Views
    251

    May have to turn on display_errors in the script...

    May have to turn on display_errors in the script -- though if it's a parse error of some sort, it will only display if it's turned on in your PHP config.


    <?php
    error_reporting(E_ALL);...
  4. Do you have all error reporting turned on? (Could...

    Do you have all error reporting turned on? (Could simply be that your PHP configuration does not allow file_get_contents() to use URLs, a common security setting, in which case you'd need to user...
  5. Thread: Security In Php

    by NogDog
    Replies
    3
    Views
    260

    Since I have no idea what...

    Since I have no idea what Phpbb_Like::__construct() does nor what Phpbb_Like::save() does, I can't really comment on DB security -- though I'd assume (which may be dangerous?) that if it's built-in...
  6. Replies
    5
    Views
    287

    Based on what may be a faulty understanding of...

    Based on what may be a faulty understanding of the actual functional requirements, I might use this query (after ensuring that $val_1 and $val_2 are integers):


    $sql = "
    SELECT COUNT(*) AS...
  7. session_start() must be called before anything...

    session_start() must be called before anything gets output, including anything -- even white-space -- not within the <?php ... ?> tags. (If you turn on error reporting, you'll probably see some...
  8. I have no experience with IIS, but with Apache...

    I have no experience with IIS, but with Apache you just have to restart it, not the physical (or virtual) server itself. Afraid I'm a LAMP stack guy, though, so probably can't help much (other than...
  9. Just to double-check, did you verify which...

    Just to double-check, did you verify which php.ini file is actually being used by your web server (e.g. see what phpinfo() says when in a web page launched by the server). Sometimes you end up with...
  10. You can do a view source of that page (or use...

    You can do a view source of that page (or use Firebug like I did) and find out that they use a couple functions in a JavaScript file with calls to them on the related HTML elements.
    ...
  11. Replies
    3
    Views
    386

    In my opinion, the best thing your schooling can...

    In my opinion, the best thing your schooling can provide is teaching you general programming concepts and principles, and some reasonable amount (for an undefined value of "reasonable") of exposure...
  12. It's all about schedule, budget, and...

    It's all about schedule, budget, and functionality. You use the tools at your disposal that best fulfill the customers' needs in the time and budget you have at your disposal. There is no single...
  13. Replies
    1
    Views
    231

    One article on how to run Tomcat (for Java) with...

    One article on how to run Tomcat (for Java) with Apache (for PHP): http://robjames.name/2010/01/29/configure-apache-to-run-tomcat-and-php-2/
  14. Replies
    5
    Views
    269

    Or... /** * limit output length of string,...

    Or...


    /**
    * limit output length of string, adding ellipsis as needed
    * @return string
    * @param string $str
    * @param integer $max (defaults to 150)
    */
    function limchar($str, $max=150)
  15. Thread: Syntax Question

    by NogDog
    Replies
    1
    Views
    244

    It's going to try to execute the method which is...

    It's going to try to execute the method which is named whatever is in $_GET['actionx'] from the Controller class of which $controller is an instance. Of course, it will throw a fatal exception if for...
  16. Might want to try re-posting that (broken) link.

    Might want to try re-posting that (broken) link.
  17. Replies
    5
    Views
    307

    My recipe for procrastination: I'm lazy. Of...

    My recipe for procrastination: I'm lazy. Of course, there are those who claim that's one of the 3 attributes of a good programmer. :)
  18. Same as your other post: you need a space after...

    Same as your other post: you need a space after "INTO".
  19. You left out the space between "INTO" and the...

    You left out the space between "INTO" and the variable name that follows in your SQL. (PS: I hope there's no way for a malicious user to inject something into that variable?)
  20. Replies
    1
    Views
    221

    You could look into using the GMP extension's...

    You could look into using the GMP extension's gmp_prob_prime() function.
  21. Replies
    3
    Views
    400

    if(isset($err) and $err == 1) {

    if(isset($err) and $err == 1) {
  22. Replies
    2
    Views
    345

    Moved to JavaScript forum, since this seems to...

    Moved to JavaScript forum, since this seems to have nothing to do with PHP (though admittedly I'm not even sure what you want to do?).
  23. Did you require[_once]() whatever file defines...

    Did you require[_once]() whatever file defines Home before trying to instantiate it, Or are you trying to use an __autoload() function? (Sorry, but I'm to lazy to follow links to the full code, so...
  24. Replies
    1
    Views
    292

    Type-hinting is used to enforce that the hinted...

    Type-hinting is used to enforce that the hinted argument passed by any code calling that function/method is passing the correct type of object. (If not, a fatal run-time error will occur.) So in your...
  25. Replies
    2
    Views
    382

    I also prefer PDO. That being said, if you prefer...

    I also prefer PDO. That being said, if you prefer to use MySQLi for some reason, you have two basic choices: use the procedural syntax (which would be very similar to the mysql_*() syntax, with the...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4
HTML5 Development Center



Recent Articles