serii@serii:~$ iconv -f CP1251 -t CP1252 file.txt > result.txt
iconv: cannot open input file `file.txt': No such file or directory
iconv -f ISO-8859-1 -t CP1252 file.txt > result.txt
echo "some text" > readme.txt
iconv -f ISO-8859-15 -t UTF-8 readme-copy.txt > result.txt
Èòàê, ïëàí âûïîëíåíèÿ äîìàøíåãî çàäàíèÿ.
0. Ñîçäàéòå â ñâîåì ïðîåêòå ïàïêó, ïîëîæèòå â íåå íåñêîëüêî ôàéëîâ-èçîáðàæåíèé.
1. Íàó÷èòåñü ïîëó÷àòü ñïèñîê ôàéëîâ èç çàäàííîé ïàïêè. Ïðîâåðüòå.
2. Âûâåäèòå íà ýêðàí ñïèñîê âñåõ ôàéëîâ èç ñîçäàííîé ïàïêè.
3. Âûâåäèòå ñ ïîìîùüþ HTML ýòè èçîáðàæåíèÿ.
4. Ðàçáåðèòåñü - êàê ñîçäàþòñÿ ôîðìû äëÿ çàãðóçêè ôàéëîâ íà ñåðâåð
5. Íàïèøèòå ïðîñòåéøèé îáðàáîò÷èê äëÿ çàãðóçêè ôàéëà. Ïðîâåðüòå åãî ðàáîòó.
6. Ïî÷èòàéòå î íàñòðîéêàõ PHP, îãðàíè÷èâàþùèõ ðàçìåð çàãðóæàåìûõ ôàéëîâ. Âîçìîæíî, âàì ïðèäåòñÿ óâåëè÷èòü ýòî îãðàíè÷åíèå.
7. Ñîçäàéòå ôîðìó äëÿ çàãðóçêè ôàéëà-êàðòèíêè, êîòîðàÿ áóäåò îòïðàâëÿòü ôàéë îáðàáîò÷èêó. Îáðàáîò÷èê æå â ñâîþ î÷åðåäü ïðîâåðèò êîððåêòíîñòü çàãðóçêè, ïîìåñòèò ôàéë ñ ïàïêó ñ èçîáðàæåíèÿìè è ïåðåáðîñèò ïîëüçîâàòåëÿ íà ãëàâíóþ ñòðàíèöó ãàëåðåè.
Èñïîëüçóéòå ôóíêöèè äëÿ ðàçáèåíèÿ çàäà÷è íà ïîäçàäà÷è. Èñïîëüçóéòå require äëÿ ñîçäàíèÿ áèáëèîòåêè ñâîèõ ôóíêöèé.
Çàäàíèå ïîä "çâåçäî÷êîé". Èñïîëüçóÿ ïðåäûäóùåå ÄÇ ðàçðåøèòå çàãðóçêó ôàéëîâ â ãàëåðåþ òîëüêî àâòîðèçîâàííûì ïîëüçîâàòåëÿ.