Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
You could make users add tags to the snippets. Then make a tag cloud. Seems to be pretty popular "Web 2.0" feature.
-
If security is an issue. Try looking at SE Linux (Security-Enhanced Linux) which is some programs/tools from NSA to, well, enhance security on a Linux distribution. I haven't tried it though.
-
You may be limiting to two questions at a time, but one day later two new questions appear on the misc. board. I think that is what he meant.
-
In the regular reply box, if you look below it in the list of previous messages, each one has an "Insert Quote" link in the UR corner. Click that. Or turn the quick reply box off.
-
Why not just use RSS feeds from various news websites?
-
How about we just remove the normal reply box, and put all that stuff in the quick reply. Then what about previews? They are handled in the "normal" reply box.
-
Two Questions. Code and Solved
Daniel0 replied to offsprg01's topic in PHPFreaks.com Website Feedback
I am personally against the -tag for two reasons: [*]It does not use a monospace font. [*]It does not add a box clearly seperating code from content and which also allows you to scroll. Generally my opinion is that [i]all[/i] code should be enclosed in [code]-tags. May it be CSS, HTML, PHP, JavaScript or whatever. Also note: There is a tag called [nobbc]. Any BBcodes within that will not be parsed. It is especially useful when you want to mention a specific tag so you do not have to do something like [ php], but rather [php]. Example: [code]The [nobbc][php][/nobbc]-tag[/code] -
Two Questions. Code and Solved
Daniel0 replied to offsprg01's topic in PHPFreaks.com Website Feedback
To display your code inside a code box, do this: Your code in here To mark it as solved, click the solved button. I think it is located near "reply | notify | etc." at the bottom/top. It is only available in forums where questions are supposed to be posted (e.g. "PHP help"). -
Very impressive. I can't even draw with a pencil on paper...
-
It is important to use when you are transferring sensitive information (such as credit card information). An SSL certificate is a certificate proving who you are (I think). You can sign a certificate yourself so generally certificates are only trusted if they are from a well established signer (as VeriSign).
-
Eh... apples and bananas are the only fruits I like.
-
You need to enable Ruby on Apache. For that you will need modruby.
-
[quote author=neylitalo link=topic=119299.msg519609#msg519609 date=1170400107] fert: I've never seen this, can you explain it? [code]$string1{$count}[/code] [/quote] It takes the [tt]$count[/tt]th character in string. Example: [code]<?php $string = "abcdef"; echo $string{0}; // echoes the 0th character in $string (a) echo $string{2}; // echoes the 2nd character in $string (c) echo $string{2+1}; // echoes the 3rd character in $string (d) echo "\n"; for($i=strlen($string)-1; $i >= 0; $i--) { echo $string{$i}; // using a variable instead of an integer } ?>[/code] The above example outputs: [code]acd fedcba[/code]
-
Also because it turns syntax highlighting on on PHP code.
-
I did. To mask means I think Spry is able to do what I think s/he requests.
-
That'd be too late. It's 00:07 here.
-
Just use the password field. It masks it with asterisks.
-
Ah sorry, sometimes I just skip to the last post... Maybe I should start reading the entire topic
-
It simply just have to be the only thing at that line.
-
How To Get The FileName Of Current Executing Script
Daniel0 replied to JustinK101's topic in PHP Coding Help
You could use <?php echo basename(__FILE__); ?> as well, but this takes the filename of the script it is located in, so if it is inside functions.php it will echo functions.php. -
I'm not sure what you are trying to do...
-
Updating your code: [code]<?php function myfunction() { echo "<strong>I love PHP !</strong>"; } ?> <a href="<?php echo "{$_SERVER['PHP_SELF']}?execute=myfunction"; ?>">click to execute myfunction!</a> <?php if(isset($_GET['execute'])) { myfunction(); } ?>[/code] Changes: echo is a language construct, not a function, therefore it does not need () around them. Changed to not use register_globals - it's not safe. $PHP_SELF doesn't always work, replaced it with $_SERVER['PHP_SELF']. [quote author=roadhog481 link=topic=124781.msg519383#msg519383 date=1170368573] in the function above, does it execute before the folderchange? [/quote] PHP is run server-side, so you cannot execute a PHP function without calling the script again. You might want to check out AJAX.
-
On the next page they will be available in $_GET or $_POST depending on how you send it.
-
The code snippet you posted above works fine for me (also with the opening and closing PHP tags).
-
<?php $contents = <<<EOF all the contents in here EOF; $fp = fopen("dir/{$time}.php", "w+"); fwrite($fp, $contents); fclose($fp); ?>