• 0
Sign in to follow this  

Erro com session



Tenho um script com o qual estou tendo problemas...

as Sessions só funcionam se colocadas antes de tudo no arquivo php...

caso contrário ele dá esse warning

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at C:\WM\www\img\estilos\header.php:13) in C:\WM\www\img\paginas\ver.php on line 256
Estou usando Somente:
$_SESSION['imgreg'] = $regid;

Sendo $regid definido anteriormente


Edited by h-abreu

Share this post

Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Só isso não daria problema, o erro está dizendo que os cabeçalhos já foram enviado, session_start() por via de regra deve ficar na primeira linha do arquivo, só ressaltando que está faltando o ; também.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this