• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Problem with php

Gandzan

New Member
Joined
Dec 4, 2009
Messages
12
Reaction score
0
Hello, my problem is about gesior acc.
I need php code where i can write something.
look screen
nmiyo3.gif

My experience with php is very poorly, please don't laugh loud xD.
Sry for bad english.
 
Thanks all for answer. I do it.
// Thread to Close
 
Last edited:
For those who were waiting for a clear answer to this, his problem was the use of 'echo' instead of the variable to declare the main content in this AAC.


'Fix'

NO: echo 'hello';
YES: $main_content .= 'hello';
 
Easy fix:

After "<?php" add "ob_start();".

Before "?>" add
Code:
$main_content .= ob_get_contents();
ob_end_clean();
 
Last edited:
Interesting. :ninja:

Echo is shorter and better looking then $var .= style. It's faster too(!).

Code:
<?php
$var = "";
$START = microtime(true);

for($i=0;$i<10000;$i++) {
	$var .= $i;
}
echo "\nTook:".(microtime(true)-$START);
$var = "";
$START = microtime(true);
ob_start();
for($i=0;$i<10000;$i++) {
	echo $i;
}
$var = ob_get_contents();
ob_end_clean();
echo "\nTook:".(microtime(true)-$START);
?>
Took:0.0043749809265137
Took:0.0028300285339355
 
Easy fix:

After "<?php" add "ob_start();".

Before "?>" add
Code:
$main_content .= ob_get_contents();
ob_end_clean();

Yeah! Gesior used ob functions, but seems like he forgot about ob_get_contents ! :blink:
 
Therefor I like Artic PHP (my own system), just echo everything as needed, and it got the best template system (my opinion).
 
Back
Top Bottom