我在使用 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++;
}
?>
如果有人能够查明阻止此脚本执行的错误,我将不胜感激!
此致
自由宁静