PDA

View Full Version : سوال: هشدار در اجرای برنامه فقط برای یکبار



hamed-php
سه شنبه 12 بهمن 1389, 15:24 عصر
سلام به دوستان

این هشدار در اجرای برنامه فقط برای یکبار می آید: و با رفرش شدن صفحه از بین میرود. علت رو چی میدونید




Notice: Undefined index: items in D:\program files\wamp\www\27\output_fns.php on line 8

Notice: Undefined index: total in D:\program files\wamp\www\27\output_fns.php on line 9

<?php
function do_html_header($title = '')
{

if(!$_SESSION['items']) $_SESSION['items'] = '0';
if(!$_SESSION['total']) $_SESSION['total'] = '0;
?>

Mr.Moghadam
سه شنبه 12 بهمن 1389, 16:11 عصر
سلام

اینجوری امتحان کن


<?php
function do_html_header($title = '')
{

if(!isset($_SESSION['items'])) $_SESSION['items'] = '0';
if(!isset($_SESSION['total'])) $_SESSION['total'] = '0;
?>

hamed-php
سه شنبه 12 بهمن 1389, 16:34 عصر
ممنون از راهنمایی شما