我遇到了一些PHP腳本的問題,應該把一些生成的圖像放在不同的文件夾中,它只是簡單地不被執行。我從運行腳本得不到任何迴應,並且對於之前的一些更改,它工作得很好。PHP腳本根本不執行
<?php
echo "hej";
$classarray = array("Lk10", "Lk11", "Lk12a", "Lk12b", "Mb10a", "Mb10b", "Mb11a", "Mb11b", "Mb12a", "Mb12b", "MbV12", "Mst10", "Mt10", "Mt12", "MtE11", "MtS11");
foreach ($classarray as $value)
{
echo $value . "<br>";
if (!mkdir($value))
{
echo "error";
}
}
$ind = 0;
for ($t = 0; $t < count($t); $t++)
{
for ($i = 1; $i <= 5; $i++)
{
$vecka = $i;
$schemaadressarray = array("http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={FDCE3A18-B5F6-45F4-B9B2-EA9171290F71}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={9407F354-F253-4289-861B-F1F6A1C37932}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={630EE8B5-18EE-42FF-ABB1-0F58725208FE}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={1410A36C-2731-4F2A-A635-C705367A076C}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={1F546257-A731-4A50-BF1F-D6D43A360F73}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={408ADF22-E6A3-4DDD-AD16-476B41F91A3A}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={E5FA8180-F4BB-4405-9201-17E99BB566F4}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={30650758-86A5-4D31-8E06-8DF98B032964}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={27787EAA-583A-4D58-BA7F-61BF646C2231}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={A126BC26-7000-4580-826B-328A96E6B156}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={6A504AB9-F851-4EBF-A4AC-5720B4956FDD}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={F81C9984-4565-4F2B-9F7C-EBCD3805397A}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={F7785411-BF36-430F-ABF1-AE456D174CDB}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={76B2F681-AE2E-4754-9609-47672369D58C}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={0B676B2D-9158-4FB4-9702-9F30FD78432F}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874", "http://www.novasoftware.se/ImgGen/schedulegenerator.aspx?format=png&schoolid=90645/sv-se&type=1&id={1CF5E0E8-F7E9-4C1B-BA8E-3B6B1FA9AC28}&period=&week=" . $vecka . "&mode=0&printer=0&colors=32&head=0&clock=0&foot=0&day=0&width=1883&height=874&maxwidth=1883&maxheight=874");
$path = $classarray[$currentIndex] . "/schema{$i}.png";
file_put_contents($path, file_get_contents($schemaadressarray[$t)));
}
$currentIndex++;
$ind++;
}
?>
如果有人能夠指出停止執行此腳本的錯誤,我將非常感激!
問候
FreeSirenety
是什麼時,它的工作,你獲取的輸出?你現在得到的輸出是什麼? – Achrome
這段代碼中有suntax錯誤。打開錯誤報告!並使用IDE。 – k102
開始添加'error_reporting(E_ALL); ini_set('display_errors',true);'到頁面的頂部。看看是否給你一個錯誤。 –