• 0
Sign in to follow this  
h-abreu

Erro com session

Question

Olá...

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_start();
$_SESSION['imgreg'] = $regid;

Sendo $regid definido anteriormente

Obrigado!

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.

Guest
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