fractalbit

fractalbit

8p

5 comments posted · 0 followers · following 0

488 weeks ago @ Online Aspect - 5 things I wish someon... · 1 reply · +1 points

I assumed you meant that because you used "index.php" files in your example. So is there a solution for php code?

488 weeks ago @ Online Aspect - 5 things I wish someon... · 3 replies · +1 points

Hi Josh, i have a question about root relative urls. In my account if i want to use them, i have to specify them like that:
/home/account_name/public_html/forum/folder1/folder2/file.php
Is it possible to specify without the '/home/account_name/public_html' part? Is there a configuration i can do so that the root is consider the public_html? .htaccess probably?

489 weeks ago @ Online Aspect - Auto detect a time zon... · 1 reply · +1 points

And one question. Is there somewhere a list of the timezones and the possible countries that fit that timezone? Sorry if i ask for too much.

489 weeks ago @ Online Aspect - How to use variable va... · 1 reply · +1 points

hmmm, it doesn't appear very well, it removed tabs and br actually appears as a new line instead of printing it. Is there a special tag i should use when posting code? (ex. {pre}code{/pre} )

P.S. You added the ability to edit comments? :) (Or is it because i am now registered to intenseDebate?)

489 weeks ago @ Online Aspect - How to use variable va... · 2 replies · +1 points

Thanks Josh, to understand it better i tried to reconstruct the function and improve on it. Here is what i ended up with:

function debug($variables){
/*
Enter the variable names you wish to debug as a string separated by commas
It will print the variable name and their respective values like: $varname = value
The variable values can be strings, integers, floats, arrays and possibly objects? (didn't test it)
For example ....

$thanks = 'to Josh Fraser';
$fruits = array("apple", "orange", "cherry");
debug("thanks, fruits");

will print...

------------------------------------------------------------------------
Debug info
------------------------------------------------------------------------
$thanks = to Josh Fraser
$fruits = Array ( [0] => apple [1] => orange [2] => cherry )
------------------------------------------------------------------------
*/

echo '<hr />Debug info';
$var_array = explode(",", $variables);
foreach($var_array as $var){
$var = trim($var);
global $$var;
$results[] = '$' . $var . ' = ' . print_r($$var, TRUE) . '
';
}
echo '<hr />' . implode("", $results) . '<hr />';
}