DocumentRoot "C:/xampp2/htdocs"
<Directory "C:/xampp2/htdocs">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
C:/xampp2/htdocs/index.php
C:/xampp2/htdocs/img/
C:/xampp2/htdocs/tmp/img/cat-with-shoes.jpg
<?php
$temp_location = 'tmp/img/cat-with-shoes.jpg';
$target_location = 'img/cat-with-shoes.jpg';
echo "Temp location - \"" . $temp_location . "\"<br>";
echo "Target location - \"" . $target_location . "\"<br>";
if (copy( $temp_location, $target_location )) {
echo "File \"" . $temp_location . "\" is copied<br>";
if (unlink( $temp_location )) {
echo "File \"" . $temp_location . "\" is deleted<br>";
if (file_exists( $target_location )) {
echo "File \"" . $target_location . "\" exists<br>";
} else {
echo "File \"" . $target_location . "\" does not exist<br>";
}
} else {
echo "Error during an attemp to delete file \"" . $temp_location . "\"<br>";
}
} else {
echo "Error during an attemp to copy file \"" . $temp_location . "\"<br>";
}
C:/xampp2/htdocs/index.php
C:/xampp2/htdocs/img/cat-with-shoes.jpg
C:/xampp2/htdocs/tmp/img/
Temp location - "tmp/img/cat-with-shoes.jpg"
Target location - "img/cat-with-shoes.jpg"
File "tmp/img/cat-with-shoes.jpg" is copied
File "tmp/img/cat-with-shoes.jpg" is deleted
File "img/cat-with-shoes.jpg" exists
В плане обучения ресурс, насколько я понял, полноценный - если вы достаточно самостоятельны, то вам его хватит для любых задач фронтенда.