This is a discussion on "large php file size" within the PHP Forum section. This forum, and the thread "large php file size are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
large php file size
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
large php file size
Hi,
I have a page which is 155 KB of (inefficient) PHP and will rise to at least double the way its going. Does this mean it will take users ages to download, or is it ok because it just outputs html text? Cheers, Geoff |
|
|
|
|||
|
Re: large php file size
You can save the web page html and check the file size of the html file. That should give you the size of the html being generated by your php file and what your user is downloading. It's probably going to be a lot smaller than your php file.
I guess if your talking about speed of processing the php file, it depends on whether the whole php file is being used every time. What I mean by that is if you have if/else statements it's only going to do the if OR else part and ignore the rest. If the whole 155KB of file is being processed, then it's gonna take a little bit longer, I wouldn't think it would be something to worry about... |
|
|||
|
Re: large php file size
Hi, yeah its not the HTML which I was worried about. Theres a lot of if statements with quite a few conditionals attached to each one.
That should be fine then. Thanks for your reply. |
|
|||
|
Re: large php file size
You can conditionally load php via include or require - so that you can shunt code that's only needed in some circumstances out to other files and cut down on the amount that has to be interpretted each time.
|
|
|||
|
Re: large php file size
Yeah thats could be a good way to organise things as well, rather than having a super long document
|
|
|||
|
Re: large php file size
|
![]() |
| Tags |
| file, page, php, size |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Best way to reduce file size of .jpg | lmc148 | Graphics and 3D | 12 | Jan 17th, 2008 07:43 |
| Image file size help | danny322 | Graphics and 3D | 6 | Nov 9th, 2007 11:20 |
| increasing file size | begeiste | PHP Forum | 3 | Sep 30th, 2007 05:33 |
| Large File Transfer | Monie | Webforumz Cafe | 28 | Jun 29th, 2007 20:28 |
| Need help with E-Card file size | amber | Graphics and 3D | 7 | Jun 19th, 2007 06:24 |