RE: [PHP]
| From: | Vlad Kulchitski | Date: | Wed, 27 Mar 2002 02:15:30 +0000 |
| Subject: | RE: [PHP] | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90307@lists.php.net to get a copy of this message | ||
OK, hope you don't mind I follow up a question, and it will be up to you to answer or not, this
is very general and important to me.
My whole project main template is FILE.PHP, the content is changed based on the values sent via
QUERY_STRING. SO:
Below is the approximate outline: (basically the content is loaded from smaller scripts, but main
does language switching, loading menu in appropriate language and so on.
FILE.PHP
_about.php
_one.php
_two.php
So my question is, is it better to use separate .PHP file for every part of the page and load
template design requirements (like 'header' and 'footer') via REQUIRE() so
there's no conflict with sessions for instance? Because the code is already BIG:
http://www.kulchitski.com/btl/source.php
So anyway, for who are experienced the question goes, is it better to use separate file for every
script? Or do like I do use one main and then include('content'php') based on the
value passed in the string.
With my current session problem I don't thnk I can overcome the problem with current design
structure, I need to use different file for ADMIN because the template is already formed before it
included the file with the script that tries to create a session.
Anyway, this certainly makes it clearer - thank you guys.
Vlad
-----Original Message-----
From: Miguel Cruz [mailto:mnc@stoic.net]
Sent: 26 березня 2002 р. 20:41
To: Vlad Kulchitski
Cc: php-general@lists.php.net
Subject: Re: [PHP]
On Tue, 26 Mar 2002, Vlad Kulchitski wrote:
> Hi can anyone help me, I am getting this error when I try
> to start session:
>
> Warning: Cannot send session cookie - headers already sent by (output
> started at /var/www/kulchitski/btl/btl.php:2) in
> /var/www/kulchitski/btl/_talkroom_edit.php on line 39
>
> I didn't start session before, in fact I never use session here
> except this step. Can anyone suggest anything?
1) Read the list and the archive. This comes up at least once per day,
including on days when I know I saw you post to the list.
2) It means that you generated output prior to a session_register or
session_start call. Make sure you don't print anything and don't have any
space outside of <?php tags prior to those calls.
3) Read the list and the archive. This comes up at least once per day,
including on days when I know I saw you post to the list.
4) Read the list and the archive. This comes up at least once per day,
including on days when I know I saw you post to the list.
miguel