Jump to content

requinix

Administrators
  • Posts

    15,229
  • Joined

  • Last visited

  • Days Won

    427

Everything posted by requinix

  1. 1. Add an else, like you said. 2. Copy the code you have now into the else branch. You're copying it because that's how it sends emails already, not because you want to send the same email. 3. Modify the appropriate parts: - Email template, probably both $email_template and $inner_template1 - Subject too - The $to email should be the sender (the $from doesn't change as that's the system email) Everything else looks the same as it deals with templating and with sending emails in general.
  2. Use a variable to track if any files were found. It starts with the value false and you set it to true when you find the file. After the loop you check the variable.
  3. Could it have something to do with the fact that you're trying to use CSV parsing on data that is not CSV? Should your regular expression be more specific, to match "blog" and "xx yy" and "zz" separately?
  4. Obviously not in there. Depends on your sendmail program's configuration.
  5. Have you tried to figure it out yourself? It's really straight-forward. I mean, it's not like MySQL can't do basic addition.
  6. The from address will be whatever the mail client is configured to use, which may also vary further if the email is sent through an email provider (like Gmail). You can install anything that claims to be a "sendmail" client. There are many to choose from, and while none of them are particularly better than others, some may be better suited to your needs.
  7. People will not read code unless the code itself is readable. Use tags around your code. I added them for you this time but you need to do it next time yourself. What you're missing is how to post a question. What are you talking about? What ID? What "aceptoterm"? Use multiple sentences to explain what you're trying to do, why, what you've tried so far, what the code is doing, and what you want the code to be doing.
  8. Match an entire line and make sure your pattern has "23456" in it. Give it a shot - it isn't particularly tricky.
  9. Look at the getNBest() method. Is there documentation for this stuff? If not, look at the code. It probably does not take any arguments and it probably returns that _NBest object. Apparently that class has getHypothesis() and getResultText() methods, so you need to call them. Not on the response but on the NBest object. $response->getNBest()->getHypothesis()
  10. That the return value from getNBest is not a string? Well what is it then? I bet you it's an object and that you'll have to call a method on it...
  11. All of those properties are private. You can tell because every single one says "private". Look for a method on the object that you should call.
  12. I'm not sure why you're grouping by the rating ID. Shouldn't you be using the post ID? The only thing you should care about in the rating table is its post ID (to link to the post) and the "num" (rating value or whatever).
  13. Make your code check that the form was submitted before it tries to get values from the form. One way would be to look for the submit button in $_POST as that indicates the user clicked it and thus submitted the form.
  14. You cannot simply add an 'i'. They are different functions. You need to actually learn about mysql (so you know what you have now) and mysqli (so you know what you need to have).
  15. The second argument to date() is a number, not a string. See how the first time you used it the value came from strtotime() but the second time it came from date()? $time = strtotime($_REQUEST['sched-date']." ".$_REQUEST['sched-start']); $newformat = date('c', $time);
  16. What does it show if you change the code to echo 'User since : ' . date('d/m/Y H:i a T',$user_info['regdate']) . ' ';("T" is the timezone date() is using)
  17. 1. Mapping the location to a drive will not affect permissions. 2. You can only link people to Z: if everybody has that location mounted as that drive letter. Skip the chdrive (which doesn't even exist), skip the chdir, and give glob() the full path. <?php foreach(glob('//DERFPFNAP001/all.rb/Vorlagen/*') as $key => $file) { echo '<li><a href="Z:/Vorlagen/'.$file.'" download="Z:/Vorlagen/'.$file.'">'.$file.'</a></li>'; } ?>Are you saying that does not output anything? Are you running this from CLI (to test with) or from the server? Try running it the other way to see if there's a difference. And I'll say it again because 99% it's the cause of this problem: the \\DERFPFNAP001\all.rb share and the all.rb\Vorlagen file permissions are definitely allowing your IIS to connect? As in when you check the permissions you see an entry for IUSR or IUSR_something*, and that entry grants read and list permissions? Also, I tend to assume people have their PHP error settings set to something useful, but that's not always the case. Do you have error_reporting = -1 display_errors = onin your php.ini? If not, set them, restart the IIS application pool, and see if there are any errors or warnings on that one page. * I think it's IUSR_machine_name. Others groups may work too, like Everyone or Authenticated Users.
  18. To upload multiple files at once, the file input does need to be named with a [], like "imageFile[]". When you do that, $_FILES["imageFile"]["name", "size", etc] will be arrays. The caption input will need []s too, then the entry in $_POST will also be an array. Supposedly all the arrays will be of the same length, but you shouldn't assume that in your code. Basically, foreach ($_POST["imageCaption"] as $key => $caption) { $file = array( "name" => $_FILES["imageFile"]["name"][$key], "size" => $_FILES["imageFile"]["size"][$key], "tmp_name" => $_FILES["imageFile"]["tmp_name"][$key], "type" => $_FILES["imageFile"]["type"][$key] ); // now you have $caption and $file to work with }
  19. So the code was accurate and your output was just the example? Or was the output accurate and your code was the example? If it's that then we need to see that code.
  20. That output doesn't match up with your code. Are you saying you get actual output like "30/07/2015 05:25 am" when you expect to see "30/07/2015 03:25 am"?
  21. As two separate queries? Start with ps_products, LEFT JOIN (so it's optional) the tmp_BF table on that field, then filter the results to WHERE tmp_BF's supplier_reference IS NULL. A matching row "can't" possibly have that value as NULL so it'll only return the results without a match. Reverse the process for the other direction. Or are the tables the same and you'd like one query to show which rows from which tables are missing?
  22. Right, I forgot to ask what "doesn't work" means... There's nothing in your code that would cause random slowdowns (that aren't related to network problems). Is there more code? Have you figured out where in the code the slowdown is?
  23. If you're using IIS then its user needs to have permissions to access that server and list the files in that share/directory. Ask your network administrator to set that up for you.
  24. target is merely the string "search_output". Not the element.
  25. WHERE has to come before the ORDER BY.
×
×
  • 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.