mendoz Posted April 15, 2007 Share Posted April 15, 2007 Hey freaks This time I am trying to save a file after it was processed with phpthumb. I want to remove the old file and put the new one instead. <?php $file = '../thumb/phpthumb.php?src=../images/file.jpg&w=100'; $destination = '../images/file.jpg'; copy($file,$destination); ?> This is what I get: failed to open stream: Invalid argument Prove your freakness! please.. Link to comment https://forums.phpfreaks.com/topic/47109-phpthumb-freaks-here-please/ Share on other sites More sharing options...
ShogunWarrior Posted April 15, 2007 Share Posted April 15, 2007 AFAIK copy() will try to get a real system file, it will not request the page. You will need to include the library and process in-page. Link to comment https://forums.phpfreaks.com/topic/47109-phpthumb-freaks-here-please/#findComment-229805 Share on other sites More sharing options...
mendoz Posted April 15, 2007 Author Share Posted April 15, 2007 Maybe fopen()? Link to comment https://forums.phpfreaks.com/topic/47109-phpthumb-freaks-here-please/#findComment-229930 Share on other sites More sharing options...
ted_chou12 Posted April 15, 2007 Share Posted April 15, 2007 i believe fopen() deal with text files, and will cause problems if you are trying to open an image file, try file_get_contents(), that should work. tell me what the result is. Ted Link to comment https://forums.phpfreaks.com/topic/47109-phpthumb-freaks-here-please/#findComment-229931 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.