Jump to content


Staff Alumni
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by AbraCadaver

  1. Depends. Do you want to redirect to this new page and pass it vars or do you want to call it "behind the scenes" and receive its output?
  2. Only works if you're root or the file owner which couldn't be the case or no need to chmod() it. ShviaGupta? Does the img/ dir exist? You need to look into Linux file permissions and check the dir if it exists to make sure the Apache user (probably apache or www-data or something) has write permissions.
  3. Thanks y'all! Thanks to .josh for the nomination and all who voted!
  4. With the exception of "It's not complete code", my original post still stands. Why not look into that? That being said, as a fix to the existing code, if you move: if(!in_array($str, $exclude_list)){ //to below $str = $row['type']; It might work, but I haven't looked through all of the remaining code.
  5. Lot's of problems. It's not complete code, it doesn't make much sense and your primary goal (excluding), you're doing before the query and before you define $str. Why not just do something like this in the query: WHERE table_name.type NOT IN ('LADIES','JUNIOR','SENIOR') Or simpler if you know you only want PRO: WHERE table_name.type = 'PRO'
  6. The webserver user doesn't have permission to open img/120300.png on this server.
  7. Most of the top frameworks are well documented and have a blog tutorial or some such. Try running through a couple and see which one(s) seem to make sense to you and seem like they make your coding easier/quicker. CakePHP, Laravel, Yii and several others. I just saw trq say that CI is dead. I've never used it but I need to go read up on what happened.
  8. Fuel is the only one that I've never heard of, guess I need to check it. It's all a personal preference, but I prefer Cake though it's quite different from CI.
  9. Only reflection as far as I know: $func = new ReflectionMethod('car', 'drive'); echo $func->getNumberOfParameters()." total\n"; echo $func->getNumberOfRequiredParameters()." required\n"; print_r( $func->getParameters() );
  10. Also, strip_tags() strips the php tags. You should be fine since you are using mysqli_real_escape_string()
  11. You can try: $text = html_entity_decode($text); $text = strip_tags($text, '<b><i><font>');
  12. Just out of curiosity, why do you provide an editor to let the user format text as HTML if you are just going to strip out the tags afterwards?
  13. Post the code from where the variable exists unmodified up to where it is inserted in the db.
  14. Those aren't tags. You ran htmlentities() on it before hand, thereby converting the < > etc. into entities such as < > which do not make tags.
  15. Agreed. Not just magic but FM. PHPMyAdmin is PHP and either mysql or mysqli functions and so is your script.
  16. Works great for me: You are not legal drink What were you expecting?
  17. What I posted will work for this scenario, but to go along with mac_gyver, use it in the loop that displays the rows: function customize_row($row) { $row['postdate'] = Forum::change_date(strtotime($row['postdate'])); $row['boardname'] = ucwords($row['boardname']); $row['topicname'] = Words::shortenText($row['topicname'],30); $row['board'] = strtolower(str_replace(array(' ','\''), array('-',''), $row['boardname'])); return $row; } // your display code foreach($rows as &$row) { $row = customize_row($row); // output $row stuff }
  18. And, I agree with mac_gyver. Do this formatting either when you loop to get results from the DB or better when you display them. Maybe put it in a function that is called in the display loop.
  19. Don't try and modify the $rows array directly in the loop. Reference $row. Try this: foreach($rows as &$row) { $row['board'] = strtolower(str_replace(array(' ','\''), array('-',''),$row['boardname'])); $row['boardid'] = $row['boardno']; $row['boardname'] = ucwords($row['boardname']); $row['topicname'] = Words::shortenText($row['topicname'],30); }
  • 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.