michelleqw
Programmer
Dear php users,
We want to create a lot of background colors. If the index.php start a background color will random choosen. After that we want to copy this file to a filename what is used for all pages.
If we do so the starting page gives an error that we don't have permission to do this.
We have username / password to upload files. What do we have to do to rewrite our index.php file so we can copy a file?
Source:
<?php
$number = rand(0,15);
$bgc= "bgc" . $number . ".jpg";
if (!copy("information/pictures/" . $bgc, "information/pictures/backgroundcolor.jpg")) {
echo "failed to copy $bgc...<br />\n";
}
Error message:
Warning: copy(information/pictures/backgroundcolor.jpg) [function.copy]: failed to create stream: Permission denied in / on line 14
failed to copy bgc0.jpg...
Nice regards,
Michelle.
We want to create a lot of background colors. If the index.php start a background color will random choosen. After that we want to copy this file to a filename what is used for all pages.
If we do so the starting page gives an error that we don't have permission to do this.
We have username / password to upload files. What do we have to do to rewrite our index.php file so we can copy a file?
Source:
<?php
$number = rand(0,15);
$bgc= "bgc" . $number . ".jpg";
if (!copy("information/pictures/" . $bgc, "information/pictures/backgroundcolor.jpg")) {
echo "failed to copy $bgc...<br />\n";
}
Error message:
Warning: copy(information/pictures/backgroundcolor.jpg) [function.copy]: failed to create stream: Permission denied in / on line 14
failed to copy bgc0.jpg...
Nice regards,
Michelle.