Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. Use call_user_func_array(). But bind_param wants references so function foo(mysqli_stmt $stmt, array $args) { $refargs = array(""); foreach ($args as $key => $value) { $refargs[] =& $args[$key]; } call_user_func_array(array($stmt, "bind_param"), $refargs); }That's a start.
  2. Also make sure the magic_quotes php.ini setting is turned off.
  3. exeTrix gave you the answer in the other thread. By the way, when you don't think you've gotten the answer you need, creating yet another thread is not the solution. Say that you don't understand and give people a chance to clarify. When you make a second thread it seems like you're just trying to ignore the people who were helping you before.
  4. The title says memory but your post says CPU. MySQL should be using as much memory as it possibly can. That's a good thing. If it's using too much CPU then it's probably choking on some difficult queries. Use the slow query log (or do some SHOW FULL PROCESSLISTs) to see what it's trying to work on during those high loads.
  5. uniqid mt_rand
  6. So you've got, say, /index.php and you have your links pointing to "/index" and it's not working? What do you know about your server setup?
  7. Where's $Start_value coming from? $Pay_freq? The rest of the code? You need to post the whole thing. Posting little pieces here and there just means I have to come back and tell you to keep posting code until you find the right stuff.
  8. ...What?
  9. Inside /images/.htaccess try RewriteRule ^/?$ / [L,R=301] RewriteRule ^/?subfolder(/|$) / [L,R=301]
  10. That means the query failed. Use mysql_error to find out why.
  11. 1. That validates either exactly 10 digits or exactly 14 digits. 2. What "string returned"? Is there more code you haven't shown us? Also: sniped from Psycho
  12. The second one is pointless because the first one will include the subfolder. That will redirect everything that tries to go to images/* to the homepage. If you have an image in there then it will not work. Is that what you want?
  13. Not really. Do it in code instead: 1. Make your query sort by the question so that way all the answers for the same question will come together 2. As you loop through the answers, keep track of the current and previous question 3. When the question changes (or it's the first answer) then you display it anew, otherwise it's the same so don't do anything 4. Then display the answer What kind of output are you aiming for?
  14. requinix

    vbscript

    Not possible.
  15. The "Your Contribution", "Employer Matched Contribution", and "Total Contribution" fields look right. Which is what the code you posted is for. If the problem is with the monthly stuff then how about you post the code for the monthly stuff?
  16. Because...? You do have to fix your links to not include the extension - that doesn't happen for free.
  17. set_time_limit Are you running this from a cronjob? You should be. Apparently this takes too long to be suitable for doing during a normal page load.
  18. Increase the timeout. Any reason you have to do them all at once? Can you put off looking up an individual user until you really need it?
  19. If you don't mind being able to hide all extensions (you don't have to) and you use Apache then you can put Options +MultiViewsin your .htaccess.
  20. And I'm saying (implying) that simplifying the template syntax is a step in the right direction. At a minimum right now you'd need three different regexes for the three different formats so that you can simply find tags in the right "format" and then deal with their actual purposes during replacement (a la preg_replace_callback()), but the one that handles the HTML-esque tags will slow down the parsing so much because it'll find HTML tags too. Neither of your solutions are great. That's why I'm trying to steer you in a smarter direction.
  21. Typically the template does that logic, along the lines of {{if show_time eq "on"}} {{time}} {{/if}}
  22. How do you feel about picking one tag format and sticking with it? I see three in there. {}s are traditional so maybe {include block=dim_header} {start block=welc} {$dimphrase.welc_msg|replace values="mooo,ererer"} {welc_msg|replace values="ya,yahoo"} {end block=welc} {start block=welc_msg2} {$dimphrase.welc_msg} {welc_msg|str_replace values="1,2,12"} {start block=UY} hii 6 {end block=UY} {start block=GO} hii 5 {end block=GO} {end block=welc_msg2} {include block=news_important} {*TEMPLATE ZONE START:DONT REMOVE NEXT LINE*} {includezone block=Important_block_module} {*TEMPLATE ZONE END*} {start code=php} echo "ahmoodi"; {end code=php} {start code=php} echo 'yoyoyo'; {end code=php} {gogogo|replace values="hi,hello dimofinf"|replace values="hell,hmooda"} {function: randomcolor} {function:calc name="row" values="1,5,8" sign="+"} {includescript block=./news} {if " eq '1'" - not sure what youre trying to show here} ahmed {endif}
×
×
  • 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.