Creating static pages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

stop editing the post you are making it worse. You can only post so much data at a time on this board.. chop the file up into several chunks.. sheesh
User avatar
smpdawg
Forum Contributor
Posts: 292
Joined: Thu Jan 27, 2005 3:10 pm
Location: Houston, TX
Contact:

Post by smpdawg »

Phenom - Agreed. That code could be reduced dramatically by using some CSS and ...
jmueller0823
Forum Commoner
Posts: 37
Joined: Tue Apr 20, 2004 9:06 pm

Post by jmueller0823 »

It was me (shoot me!) No offense taken.

I guess the page was designed for visual appeal-- not performance.

The php url is my site.
Why include the pages via URL...
Feyd, what is the alternative?
Have you looked at any of the PHP optimizers like PHP-Accelerator, etc? Do you have compression turned on for the output?
Not aware of these. These are on the server?

As far as php code is there-- several includes from our psDynamic script.

We're missing the very bottom of the code which is (mostly) Webtrends code.

[/quote]
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

I guess the page was designed for visual appeal-- not performance.
I have never once in my days heard from from an HTML standpoint :P.
You should seriously look into CSS....

after visiting your site, it does not seem that you have a lot of content.. must be how it is processed.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the includes should be local includes when on your own server.. I'd seriously suggest redesigning to use span and div elements and CSS.. that should seriously reduce the file size alone.
jmueller0823
Forum Commoner
Posts: 37
Joined: Tue Apr 20, 2004 9:06 pm

Post by jmueller0823 »

Time to study up on CSS.

We're using CSS in a limited way (font syles, table attributes, etc.)
Would CSS reduce the table clutter?
jmueller0823
Forum Commoner
Posts: 37
Joined: Tue Apr 20, 2004 9:06 pm

Post by jmueller0823 »

feyd
the includes should be local includes when on your own server.. I'd seriously suggest redesigning to use span and div elements and CSS.. that should seriously reduce the file size alone.
Point taken.

What do you mean be "local" includes? Elaborate please.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

local file system.. include('/home/your_server_path/php/psDynamic/psDynamic.php');

I'd convert whatever is inside that script to a function or set of functions, so you only have to include it once at the top of the page, then just call the function with $command and $cid or whatever..
jmueller0823
Forum Commoner
Posts: 37
Joined: Tue Apr 20, 2004 9:06 pm

Post by jmueller0823 »

feyd
I'd convert whatever is inside that script to a function or set of functions, so you only have to include it once at the top of the page, then just call the function with $command and $cid or whatever..
Is this topic covered on these forums somewhere? Thanks.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

not especially..
User avatar
Silver_Girl
Forum Newbie
Posts: 7
Joined: Wed Mar 02, 2005 4:52 pm
Location: Victoria, BC

Post by Silver_Girl »

you say you are getting "MySQL too many connections open" errors?

are you closing your db connections?

this can really slwo things down.

not to mention, as many people have there is no need for this table structure, and if CSS isn't something you know that much about or want to takle right now, try optimising your html. you can get the same result with WAY fewer tables.
Post Reply