Skip to content

Commit

Permalink
Bugfix: Must use full path
Browse files Browse the repository at this point in the history
  • Loading branch information
Holger Ludvigsen committed May 13, 2015
1 parent 37b7cd1 commit 83d99da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions php/io.php
Expand Up @@ -196,8 +196,9 @@ function main() {
if (isset($_GET['batch'])) {
$files = scandir('./uploaded_files');
foreach($files as $file) {
$fp = fopen($file, 'r');
$content = fread($fp, filesize($file));
$filename = "./uploaded_files" . $file;
$fp = fopen($filename, 'r');
$content = fread($fp, filesize($filename));
fclose($fp);

updateOrInsertImage($file, $content);
Expand Down

0 comments on commit 83d99da

Please sign in to comment.