طبعاً احتارت ماذا اسمي الموضوع وكيف ابدأ فيه
انا عندي فكره اريد اطبقها على موقعي
ومتعلق بحلقة while
والكود كما هو موجود بالموقع
while ($mirror_info = mysql_fetch_array ($data))
{
$host = get_host ($mirror_info['hostid']);
$hostfile = $host['file'];
$stat = $mirror_info['status'];
if ($mirror_info['status'] == 0)
{
$status = 'Upload';
}
else
{
if ($mirror_info['status'] == 1)
{
$status = 'Retry';
exec ('' . $php_path . ' -c ' . $config_ini . ' ' . $hostfile . ' ' . $file_id . ' ' . $stat . ' >/dev/null &');
}
else
{
if ($mirror_info['status'] == 2)
{
$status = 'Failed';
}
else
{
if ($mirror_info['status'] == 3)
{
$status = 'Success';
}
}
}
}
echo '<tr>
<td><img src=/images/' . $host['name'] . '.jpg </img></td>';
if ($stat == 3)
{
if ($direct_url == '1')
{
echo '<td><a href=' . $mirror_info['url'] . ' target=_blank><img src=/images/click.gif border=\'0\' /></a></td>';
}
else
{
echo '<td><a href=/redirect/' . $file_id . '/' . $mirror_info['hostid'] . ' target=_blank><img src=/images/click.gif border=\'0\' /></a></td>';
}
}
else
{
echo '<td><img src=/images/na.gif /></td>';
}
echo '<td>' . $mirror_info['hits'] . '</td>
<td><img src=/images/' . $status . '.gif /></td>
</tr>';
}المشكلة كلها الامر التالي علي ما اعتقد
else
{
if ($mirror_info['status'] == 2)
{
$status = 'Failed';
}اريد في حالة كون الـ status يساوي 2 ان يعيد الحلقة من جديد بدل تنفيذ امر Failed
ارجو ان تفهمو قصدي
وارجو ان يساعدني احد لشده احتياجي لهذا الشرح
أسف لو المكان مو مناسب بس كتبت هنا الموضوع لأصحاب الخبره الذين يدخلون هنا
يعطيكم العافيه جميعاً :)