Jump to content

requinix

Administrators
  • Posts

    15,053
  • Joined

  • Last visited

  • Days Won

    413

Everything posted by requinix

  1. 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.
  2. 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.
  3. Match an entire line and make sure your pattern has "23456" in it. Give it a shot - it isn't particularly tricky.
  4. 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()
  5. 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...
  6. 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.
  7. 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).
  8. 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.
  9. 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).
  10. 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);
  11. 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)
  12. 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.
  13. 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 }
  14. 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.
  15. 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"?
  16. 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?
  17. 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?
  18. 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.
  19. target is merely the string "search_output". Not the element.
  20. Try adding a $mail->addReplyTo($data['fields']['Email'], $data['fields']['Name'].' '.$data['fields']['Surname']);Otherwise, what emailing library are you using? It looks like PHPMailer except the class isn't named "ctPHPMailer".
  21. Set CURLINFO_HEADER_OUT=true with your other options, then use curl_getinfo($request, CURLINFO_HEADER_OUT)to get the request headers.
  22. Never used it myself but the first thing I thought of was MonoDevelop.
  23. Are you sure the login form contains those values? That's highly unusual. Aren't you supposed to use the email and password to look up that information in your database instead?
  24. There is nothing in that which says $realid is a number. I'm trying to get actual. values. of. those. variables. Not a description of what you think they are. Not code showing how they get values. Actual. Values. Change your function to look like function ip_add($i){ global $con; global $realid; $query="INSERT INTO media(ip) VALUES ('$i') WHERE id=".$realid; echo "THE QUERY IS '$query'"; $query_run=mysqli_query($con,$query); }Run your script. What is the entire message that it outputs? I'd like you to try to provide the entire message from that echo. Yes, I know what the first three words will be, but that's not the point. You've now demonstrated that you do, in fact, understand how to use the function. Or at least came upon some combination of letters and symbols that together formed valid code which also happened to demonstrate how mysqli_error() is used. Now, I have no idea what this new bit of code has to do with anything you've posted so far. Maybe it's supposed to work the same way as an INSERT query? But if you want to resolve those errors then your next step should be to post what those errors are. Again, the actual errors. Not a description of what they say. The actual messages you are seeing.
×
×
  • 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.