To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Code Critique

Code Critique Having someone critique your code is always a great way to hone the skills. Stop in and post your code to see what your peers may have done differently.

Reply
 
Thread Tools Rate Thread Display Modes
Old 09-29-2003, 07:33 PM   #1
jstarkey
Civilian
 
jstarkey's Avatar
 
Join Date: Jul 2002
Location: 9500 ft
Posts: 1,104
Welcome!

Welcome to the new Code Critique forum. We've created this forum in the spirit of Open Source. One of the biggest advantages of OS is the fact that everyone can see the code. Having millions of eyes on the source means that just about any bug or exploit is going to be found in record time. It also helps the community grow, by sharing the "better ways" of doing things.

Please feel free to post your code here for others to offer suggestions and/or comments. Please also share the wealth by checking out someone else's work as well.

Enjoy!!
jstarkey is offline   Reply With Quote
Old 09-29-2003, 07:35 PM   #2
n00854180t
Senior Member
 
Join Date: Jun 2003
Posts: 479
Cool forum idea
n00854180t is offline   Reply With Quote
Old 09-29-2003, 07:37 PM   #3
Merve
black sheep with red wool
 
Merve's Avatar
 
Join Date: Jul 2003
Location: North of the 49th parallel
Posts: 2,579
I think that this forum is a great idea. It'll help me find the bugs in PEBoDMyAdmin in record time! And now...BuzzLY is a mod! Congrats BuzzLY!

I just found it a little weird when I signed into PHPBuilder, went to the EL, went back to the main page, and found a new forum, but it's all good because I'm sure that this forum is going to rock and we'll be running on ten pages in record time!
__________________
"A proof is a proof. What kind of a proof? It's a proof. A proof is a proof. And when you have a good proof, it's because it's proven." -- Jean Chrétien

The Three C's
Merve is offline   Reply With Quote
Old 09-29-2003, 07:38 PM   #4
planetsim
code | beer > sleep
 
Join Date: Sep 2002
Location: aus
Posts: 4,826
This sounds like a great idea for all..

so to start things off

PHP Code:
<?php
phpinfo
();
?>
Can someone tell me how to improve that
__________________
Dont be lazy Search
And use the Manual
Webmobo - Open Source News Script | Portfolio / Blog | Against TCPA
planetsim is offline   Reply With Quote
Old 09-29-2003, 07:40 PM   #5
n00854180t
Senior Member
 
Join Date: Jun 2003
Posts: 479
LOL

PHP Code:
<?php
    phpinfo
();
?>
Indent.
n00854180t is offline   Reply With Quote
Old 09-29-2003, 07:42 PM   #6
Merve
black sheep with red wool
 
Merve's Avatar
 
Join Date: Jul 2003
Location: North of the 49th parallel
Posts: 2,579
Actually, you wouldn't indent for that one. Usually...it's a matter of preference. It's so simple that there is absolutely no point in indenting.
__________________
"A proof is a proof. What kind of a proof? It's a proof. A proof is a proof. And when you have a good proof, it's because it's proven." -- Jean Chrétien

The Three C's
Merve is offline   Reply With Quote
Old 09-29-2003, 07:42 PM   #7
n00854180t
Senior Member
 
Join Date: Jun 2003
Posts: 479
I know. I was j/k.
n00854180t is offline   Reply With Quote
Old 09-29-2003, 07:42 PM   #8
planetsim
code | beer > sleep
 
Join Date: Sep 2002
Location: aus
Posts: 4,826
yay im a master at phpinfo(); Ok i guess there are more serious ones like Merve wants..
__________________
Dont be lazy Search
And use the Manual
Webmobo - Open Source News Script | Portfolio / Blog | Against TCPA
planetsim is offline   Reply With Quote
Old 09-29-2003, 07:46 PM   #9
jstarkey
Civilian
 
jstarkey's Avatar
 
Join Date: Jul 2002
Location: 9500 ft
Posts: 1,104
Quote:
Originally posted by planetsim

PHP Code:
<?php
phpinfo
();
?>
You forgot to comment it. Remember, a year from now you may look at this and say "what was I thinking".
jstarkey is offline   Reply With Quote
Old 09-29-2003, 07:48 PM   #10
n00854180t
Senior Member
 
Join Date: Jun 2003
Posts: 479
LOL good one.
n00854180t is offline   Reply With Quote
Old 09-29-2003, 07:51 PM   #11
planetsim
code | beer > sleep
 
Join Date: Sep 2002
Location: aus
Posts: 4,826
your so right hows this

PHP Code:
<?php
//this page will say im so smart
//it will produce a whole gui look of the php.ini file
//my mates will think im some sort of genius when i show them
//    that a little line of code can produce so much
phpinfo();

//remember its php as in the language
//info as information about it
// () for no particular reason other than it looks good
// ; to close it off
?>
I might not have said enough.
__________________
Dont be lazy Search
And use the Manual
Webmobo - Open Source News Script | Portfolio / Blog | Against TCPA

Last edited by BuzzLY; 09-30-2003 at 11:23 AM.
planetsim is offline   Reply With Quote
Old 09-29-2003, 07:57 PM   #12
jstarkey
Civilian
 
jstarkey's Avatar
 
Join Date: Jul 2002
Location: 9500 ft
Posts: 1,104
While that will suffice, it's generally a good idea to follow a standard convention. Might wanna check out something like PHPDoc:

http://pear.php.net/manual/en/package.php.php

jstarkey is offline   Reply With Quote
Old 09-29-2003, 09:25 PM   #13
LordShryku
kung foo code monkey
 
LordShryku's Avatar
 
Join Date: Aug 2002
Location: Occupational Hypnotherapy
Posts: 7,473
Bah! There's those "standards" again...
LordShryku is offline   Reply With Quote
Old 09-29-2003, 09:32 PM   #14
drawmack
Computers can do that?
 
drawmack's Avatar
 
Join Date: Apr 2003
Location: Pocono Mtns PA
Posts: 3,268
actually you should turn php_info off on your server it gives a hacker too much information including your htaccess usernames and passwords.
drawmack is offline   Reply With Quote
Old 09-29-2003, 09:35 PM   #15
drawmack
Computers can do that?
 
drawmack's Avatar
 
Join Date: Apr 2003
Location: Pocono Mtns PA
Posts: 3,268
On a different note this is a great forum idea. I am working up my cv site and for it I am doing some downloadable php - mostly games and guestbooks and stuff. With this forum I can let the community test them out for me so I'm not embarassed by a stupid mistake that stops my code from executing on other people's servers.

thanks phpbuilder.
drawmack is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 07:36 AM.






Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.