Jump to content

requinix

Administrators
  • Posts

    15,266
  • Joined

  • Last visited

  • Days Won

    431

Everything posted by requinix

  1. 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);
  2. 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)
  3. 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.
  4. 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 }
  5. 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.
  6. 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"?
  7. 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?
  8. 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?
  9. 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.
  10. target is merely the string "search_output". Not the element.
  11. WHERE has to come before the ORDER BY.
  12. 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".
  13. Set CURLINFO_HEADER_OUT=true with your other options, then use curl_getinfo($request, CURLINFO_HEADER_OUT)to get the request headers.
  14. Never used it myself but the first thing I thought of was MonoDevelop.
  15. 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?
  16. 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.
  17. That's nice. But the error happens when the function actually runs, so what are the values of those two variables when the function actually runs? Did you click the link I posted?
  18. Use mysqli_error to see if there were any errors. Otherwise, what's the value of $i and $realid? The exact values - output them (you could output the query before executing it), don't just guess.
  19. .*? will stop as soon as possible, and according to your regex that means as soon as it finds a closing ]. The problem of dealing with matching parentheses, or matching brackets, needs to be done using recursion. Your pattern is very simple, fortunately, so it's easy to add recursion in: '/\[((?:[^\[\]]*|(?R))*)\]/'1. The [^\[\]]* matches anything that doesn't look like the pattern delimiters. Your pattern only uses [ and ] so that's all you have to check for. This repeats by itself for optimization. 2. The (?R) does recursion using the entire pattern (it's possible to recurse only a portion of it). Remember to repeat the two together. Note that the input string you gave does not have balanced []s so you need to fix that or else the pattern will not match anything. http://3v4l.org/vruf4
  20. Okay... You could try outputting the entire object, like print_r($proxySales);to see if there's something useful in there. Otherwise all I can suggest is to look through the SOAP examples to see how their code is supposed to be used.
  21. It's right there in your $s query. Why do you think they're defined at that point? You do define them later on, that's true, but it doesn't help $s.
  22. If you've figured it out yourself, how about posting what you did so everybody else can know about it too?
  23. :selected + .text() is the simplest answer...
  24. What's your code.
  25. The rest of the code is using mysqli so you need to use mysqli for that check too.
×
×
  • 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.