Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^2: OT :Web forum or mailing list ?

by submersible_toaster (Chaplain)
on Feb 13, 2005 at 12:59 UTC ( #430572=note: print w/replies, xml ) Need Help??


in reply to Re: Web forum or mailing list ?
in thread Web forum or mailing list ?

I can only agree with dbwiz ,

It's true that you can write bad code in every language, but PHP makes things really easy for bad coders.

Update:Fixed wrong order blockquote,italic tags. Thanks Fletch.
I submit the following example I was confronted with recently after migrating an 'acquired' companies site from a Cobalt. Names have been changed to protect the guilty. I'm trying to discover why and how much they paid for this abortion.

I discussed with the developer the register_globals-ness of this code and it's reliance on php4.2.x session side effects and other things. His suggestion to

Best thing is look at the php.ini file on the old server. Also make sure the versions of php and mysql are the same.

Yeah - php and mysql circa 2002. This message broke the light barrier on it's way my supervisor.

<? ////////////////////////////////////////////////////////////////////// +////////// // // Filename: session.php // Author: Smee Again (ANONYMIZED@MERCHANT.COM) // Created: 01.Mar.2003 // Purpose: // // Notes: // // // // Changes: // //////////////// Lasciate ogni speranza voi ch'entrate ///////////// +////////// include_once("../class/engine/page.class"); include_once("../class/engine/security.class"); class Session { var $security; var $url; var $test; var $acid; var $language; function Session() { $this->security = new Security; $acid = ""; $language = "english"; } function is_admin() { return true; } function page_open() { // check for any routing echo "page open: route: " .$this->url;// die(); if ($this->url != "") { header("Location: $this->url"); } } function page_close() { // kill any routing //$this->url = ""; } function route($url) { $this->url = $url; } }; ?>
I particularly like
  • the boilerplate cargo cult'd from ???
  • the purpose definition in the boilerplate
  • function is_admin
  • function page_close


I can't believe it's not psellchecked

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://430572]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2019-05-20 04:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (123 votes). Check out past polls.

    Notices?