Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
Also, your signature is really annoying...
-
I don't know if it's supposed to look like that (see attached screenshot), but it looks wierd... FF 2.0.0.6 [attachment deleted by admin]
-
It looks pretty good, but Times New Roman sort of ruins it a bit. It's perhaps a bit too narrow too. On Students & Parents the page is shifted a bit to the right. For the FAQ: If you want the answers to be hidden, then you should have a hidden div under the question and when you click the question then you should toggle the div on/off (not hidden/hidden).
-
I don't think you can control that, you could however make it into a PDF (using PHP) or something like that and then print the PDF. Then you could control it.
-
Also, vB and IPB's sources are not publicly available, but available to a restricted type of people only (developers and anyone who holds a valid license). While these people are allowed to modify the code freely, they are not allowed to release and/or redistribute those modified files (because the original copyright holder still retain their ownership of the code).
-
[quote author=Gho§t link=topic=118552.msg669671#msg669671 date=1187037708] [quote author=obsidian link=topic=118552.msg484797#msg484797 date=1166106097] On choosing from only [b]paid[/b], I'd have to say vBulletin; however, I would also jump on the OS bandwagon on this one. From my playing, I've found SMF to be the best overall so far for ease of use and customization. I definitely recommend people to go that way if they have a choice to use an OS one. [/quote] Every one of the choices in this poll is Open Source software. Free as in free speech, however, [b]not[/b] free as in free beer. It is possible to do that ;) [/quote] I don't know about WoltLab Burning Board (and I didn't care to check it), but IPB and vB is definitely not open source. You are not allowed to redistribute the source when you've bought it thus making it "not free" (as in both free speech and free beer).
-
Alt+Shift+S
-
One of the admins probably dropped it to zero because he keeps posting a lot of posts in a row like that. To me it would seem like he is just trying to up his post count, the admin probably thought the same.
-
Can't you just create it yourself? It doesn't sound that hard...
-
How about this? <?php $output = `svn co http://svn.something.com working_dir`; echo "<pre>$output</pre>"; ?> <?php $output = `svn update working_dir`; echo "<pre>$output</pre>"; ?> Requires SVN to be installed on the host (obviously).
-
Because when downloading the file again (I assume that that's the purpose), then you can name the original name like this: header("Content-Disposition: attachment; filename={$filename}"); So they'll e.g. download "file.txt" instead of "2203632f7d8f2c8168fc2f30217bde35file.txt".
-
What do you mean?
-
Just give them names like this: $name = md5(microtime()).$_FILES['file']['name']; And store it like that on the disk and store the original and new name in the database.
-
who are the people of this forum
Daniel0 replied to teng84's topic in PHPFreaks.com Website Feedback
Admins have full powers, super moderators have less powers and global moderators have even less powers... -
No, you'll use a visibility keyword (public, protected or private) instead the of the var keyword. var will still work in PHP5 though. See: http://php.net/oop5.visibility
-
It's \r\n and it must be in double quotes... See: http://php.net/string Edit: Please use tags...
-
What would you love to see changed or add to PHP?
Daniel0 replied to tibberous's topic in Miscellaneous
I'd like to be able to do this: (python) s = 'PHP Freaks' print s[:3] Output: PHP I believe it's called slicing. I know that substr() can do that, but slicing in Python works on lists as well. forums = ['SMF', 'phpBB', 'vBulletin', 'IPB'] commercial = forums[2:] free = forums[:2] I'd also like to be able to do this. It's Python again. db_settings = {"host":"localhost", "user":"root", "password":"", "dbname":"test"} print ";".join(["%s=%s" % (k, v) for k, v in db_settings.items() if len(v)>0]) Output: host=localhost;user=root;dbname=test The shortest way I can think of doing that in PHP would be: <?php $db_settings = array('host'=>'localhost', 'username'=>'root', 'password'=>'', 'dbname'=>'test'); $pieces = array(); foreach($db_settings as $k => $v) { if(!strlen($v)>0) continue; $pieces[] = "{$k}={$v}"; } echo join(';', $pieces); ?> Python is really cool -
Do whatever you feel like... I could, with a little help from my dictionary, probably translate your file into German as well, but there is a chance that I might make grammatical errors. If you wish I could give it a shot, but there must be somebody here who speak German natively. I think he means storing the language strings inside PHP as opposed to for example storing them in an XML file.
-
Danish: <?PHP // innlegg // entries define("WRITE", "Skriv en besked"); define("POSTEDBY", "Skrevet af"); define("EDIT", "Rediger besked!"); define("DELETE", "Slet besked!"); define("COMMENT", "Kommentar"); // form // form define("NAME", "Navn"); define("MAIL", "Email"); define("WWW", "Hjemmeside"); define("MESSAGE", "Besked"); // form respons // form feedback define("BACK", "<a href=\"javascript:history.back(-1)\">Gå tilbage[/url]"); define("SHOW", "<a href=\"$PHP_SELF?action=\">Vis![/url]"); define("E_NAME", "Navnet kan ikke være blankt!"); define("E_MESSAGE", "Beskeden kan ikke være blank!"); define("FLOOD", "Spammer! Du skal til at vente en time før du kan skrive en ny besked!"); define("POSTED", "Besked tilføjet!"); // neste & forrige // next & previous define("NEXT", "Næste »"); define("NO_ENTRIES", "Ingen beskeder i gæstebogen!"); define("PREV", "« Forrige"); // admin // admin define("USERNAME", "Brugernavn"); define("PASSWORD", "Adgangskode"); define("W_PASS", "Forkert brugernavn eller adgangskode!"); define("W_ID", "Beskeden findes ikke!"); define("EDITED", "Beskeden er blevet ændret!"); define("S_DELETE", "Er du sikker på at du vil slette denne besked?"); define("L_OUT", "Du er blevet logget af!"); define("LO_I", "<a href=\"$PHP_SELF?action=login\">Log ind[/url]"); define("LO_B", "<a href=\"$PHP_SELF?action=logout\">Log af[/url]"); ?>
-
It's just a line break. I don't see why you can't use explode() on that string.
-
What huge space?
-
Okay It is sort of explained here. The curly brackets are required when using multi-dimensional arrays (i.e. when accessing arrays using multiple indexes). When inside the string PHP will see $array[0] and says "Hey, that's a variable!" so it'll parse it. When echoing only $array[0] (which is an array/contains an array) Array will be output. Then there is the remaining ['name'] which PHP doesn't recognize as anything special and ignores it. That results in Array['name']. I've made it a habbit of always enclosing variables in curly brackets (except of course when I'm outside a string). I hope that was a good enough explanation because I can't do it better
-
Unexpected character in input error, please help :-\
Daniel0 replied to NightBeam's topic in PHP Coding Help
Running just this: <?php echo ' <table> <tr> <td>'.ucwords($Field1).'</td> <td><input hidden="text" name="'.$Field1.'" value="'.$arrival[$Field1].'"></td> </tr> <tr> <td>'.ucwords($Field2).'</td> <td><input type="text" name="'.$Field2.'" value="'.$arrival[$Field2].'"></td> </tr> <tr> <td>'.ucwords($Field3).'</td> <td><input type="text" name="'.$Field3.'" value="'.$arrival[$Field3].'"></td> </tr> <tr> <td>'.ucwords($Field4).'</td> <td><input type="text" name="'.$Field4.'" value="'.$arrival[$Field4].'"></td> </tr> <tr> <td>'.ucwords($Field5).'</td> <td><input type="text" name="'.$Field5.'" value="'.$arrival[$Field5].'"></td> </tr> <tr> <td>'.ucwords($Field6).'</td> <td><input type="text" name="'.$Field6.'" value="'.$arrival[$Field6].'"></td> </tr> <tr> <td>'.ucwords($Field7).'</td> <td><input type="text" name="'.$Field7.'" value="'.$arrival[$Field7].'"></td> </tr> <tr> <td>'.ucwords($Field8).'</td> <td><input type="text" name="'.$Field8.'" value="'.$arrival[$Field8].'"></td> </tr> <tr> <td>'.ucwords($Field9).'</td> <td><input type="text" name="'.$Field9.'" value="'.$arrival[$Field9].'"></td> </tr> <tr> <td>'.ucwords($Field10).'</td> <td><input type="text" name="'.$Field10.'" value="'.$arrival[$Field10].'"></td> </tr> <tr> <td>'.ucwords($Field11).'</td> <td><input type="text" name="'.$Field11.'" value="'.$arrival[$Field11].'"></td> </tr> <tr> <td>'.ucwords($Field12).'</td> <td><input type="text" name="'.$Field12.'" value="'.$arrival[$Field12].'"></td> </tr> <tr> <td>'.ucwords($Field13).'</td> <td><input type="text" name="'.$Field13.'" value="'.$arrival[$Field13].'"></td> </tr> <tr> <td>'.ucwords($Field14).'</td> <td><textarea name="'.$Field14.'" rows="5" cols="60" >'.$arrival[$Field14].'</textarea></td> </tr> <tr> <td colspan="2"><input type="submit" name="edit" value="Accept Edit"></td> </tr> </table>'; ?> produces no error. So it did fix it -
Unexpected character in input error, please help :-\
Daniel0 replied to NightBeam's topic in PHP Coding Help
Change <td><input hidden="text" name="'.$Field1.'" value="'.$arrival[$Field1].)'"></td> to <td><input hidden="text" name="'.$Field1.'" value="'.$arrival[$Field1].'"></td> When you see an error. Look at what it says, look at the line. The closing parenthesis wasn't that hard to spot