[Tool/Web/Other] [PHP] PAWN Indentation
#9

Alright, version 2 is now released. This script no longer breaks on multidimensional arrays!

Quote:
Originally Posted by Memoryz
Посмотреть сообщение
PHP код:
if (!isset($_POST['IndentText']))

    echo 
"Oh shit, an error occurred.";
    return 
0;

If you are trying to prevent the rest of the PHP from continuing on, I'd suggest doing this rather than returning 0. (I don't even think 'return 0' will stop the script from executing)

PHP код:
if (!isset($_POST['IndentText']))

   die(
"Oh shit, an error occurred.");

Also, indent.php can be a .html file since it doesn't execute any PHP within the file.

I like it though, very useful.
Thanks for the info! I've just updated the script. I was also thinking of implementing both of them in one, so when someone presses "Indent", the code will automatically be indented without redirecting to a new page.
Reply


Messages In This Thread
[PHP] PAWN Indentation - by Emmet_ - 11.12.2013, 20:10
Re: [PHP] PAWN Indentation - by tyler12 - 11.12.2013, 20:23
Re: [PHP] PAWN Indentation - by Emmet_ - 11.12.2013, 20:27
Re: [PHP] PAWN Indentation - by tyler12 - 11.12.2013, 20:31
Re: [PHP] PAWN Indentation - by Emmet_ - 11.12.2013, 20:35
Re: [PHP] PAWN Indentation - by Akira297 - 11.12.2013, 20:39
Re: [PHP] PAWN Indentation - by Emmet_ - 11.12.2013, 20:43
Re: [PHP] PAWN Indentation - by Memoryz - 11.12.2013, 20:57
Re: [PHP] PAWN Indentation - by Emmet_ - 11.12.2013, 21:08
Re: [PHP] PAWN Indentation - by Djole1337 - 11.12.2013, 21:56
Re: [PHP] PAWN Indentation - by Memoryz - 11.12.2013, 22:38

Forum Jump:


Users browsing this thread: 1 Guest(s)