Jump to content

batwimp

Members
  • Posts

    319
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

batwimp's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. It sounds like you want to use something like array_combine() http://us2.php.net/manual/en/function.array-combine.php
  2. Could you post the code that includes the containing divs a few levels up?
  3. If you look at the last example in example #1, they seem to have inserted a value with array_splice by using an offset of zero.
  4. And once you do get it running, stick a semi-colon at the end of your include statement there...
  5. According to my editing software, the for loop ends before the UPDATE is done. "Inconceivable" is a quote from the same movie xyph was (sort of) quoting. Just for fun.
  6. Your array offset $i doesn't exist outside your for loop, so not sure what its value will be in your UPDATE statement.
  7. You should put your code inside code tags to make it more readable.
  8. This probably won't solve your immediate problem, but you need to put breaks in your switch: switch ($a) { case "home": include("frontpage/main.php"); break case "user-process": include("user-process.php"); break; }
  9. Sorry. I was actually quoting this line of code: <?php if(isset($_POST['sub_comment_reply']) && $post_count >= $max_reply_per_day && $valid = false) { I didn't realize what I had typed was a complete line of code from another part of the file. You need to change THIS line so that (I'm assuming you want): <?php if(isset($_POST['sub_comment_reply']) && $post_count >= $max_reply_per_day && $valid != false) { or it may be: <?php if(isset($_POST['sub_comment_reply']) && $post_count >= $max_reply_per_day && $valid == false) { Either way, the code you have now will set the $valid variable to false no matter what, and the IF statement will fail.
  10. I don't know if this will fix your problem, but you need to use the comparison operator here: $valid = false should be: $valid == false
  11. Uhhh... I never actually posted to this thread before. I have no idea what that entry above from me is about...
  12. I found it. In order to pass the variable as a single argument with spaces, you need to enclose it in quotes, which means you need to quote the quotes: $arg1 = '"test 55"'; Note the double quotes are inside the single quotes.
  13. You are essentially issuing this command through the command line by using exec() from PHP. This means that your arguments are separated by a space instead of a comma. So it is treating 'text' as a separate argument instead of being part of the same string. You can set up your VBS to take multiple arguments by adding them in, which should be fairly obvious: NOT TESTED Function WriteLineToFile(ntext,ntext2) Const ForReading = 1, ForWriting = 2 Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") Set f = fso.OpenTextFile("C:\inetpub\test\test.txt", ForWriting, True) f.WriteLine ntext+ntext2 Set f = fso.OpenTextFile("C:\inetpub\test\test.txt", ForReading) WriteLineToFile = f.ReadAll End Function Dim Arg, var1, var1 Set Arg = WScript.Arguments var1 = Arg(0) var2 = Arg(1) WriteLineToFile(var1, var2) But if you want to pass the entire string as a single argument with the space(s) in them, I'm not sure how to do that.
×
×
  • 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.