- Joined
- Jun 1, 2010
- Posts
- 548
- Reaction score
- 2
I've been following a tutorial online to build my own CMS, as a way to learn php code alongside some books I'm reading. Unfortunately the site where the tutorial lives seems to be dead so I can't get any help there (http://www.elated.com/articles/add-image-uploading-to-your-cms/).
I get the following error after I've selected an image to upload and click 'save changes' on the editarticle.php page:
Warning: move_uploaded_file(/images/articles/fullsize/13.jpg): failed to open stream: No such file or directory in E:\xampp\htdocs\test\cms\classes\article.php on line 104
Warning: move_uploaded_file(): Unable to move 'E:\xampp\tmp\phpA387.tmp' to '/images/articles/fullsize/13.jpg' in E:\xampp\htdocs\test\cms\classes\article.php on line 104
Fatal error: Article::storeUploadedImage(): Couldn't move uploaded file. in E:\xampp\htdocs\test\cms\classes\article.php on line 104
Line 104 reads:
if ( !( move_uploaded_file( $tempFilename, $this->getImagePath() ) ) ) trigger_error( "Article::storeUploadedImage(): Couldn't move uploaded file.", E_USER_ERROR );
I appreciate it's a fair amount of code to look through potentially to find the issue, I was just hoping there might be a glaring mistake here that might jump out to someone who knows what they're doing! Cheers
I get the following error after I've selected an image to upload and click 'save changes' on the editarticle.php page:
Warning: move_uploaded_file(/images/articles/fullsize/13.jpg): failed to open stream: No such file or directory in E:\xampp\htdocs\test\cms\classes\article.php on line 104
Warning: move_uploaded_file(): Unable to move 'E:\xampp\tmp\phpA387.tmp' to '/images/articles/fullsize/13.jpg' in E:\xampp\htdocs\test\cms\classes\article.php on line 104
Fatal error: Article::storeUploadedImage(): Couldn't move uploaded file. in E:\xampp\htdocs\test\cms\classes\article.php on line 104
Line 104 reads:
if ( !( move_uploaded_file( $tempFilename, $this->getImagePath() ) ) ) trigger_error( "Article::storeUploadedImage(): Couldn't move uploaded file.", E_USER_ERROR );
I appreciate it's a fair amount of code to look through potentially to find the issue, I was just hoping there might be a glaring mistake here that might jump out to someone who knows what they're doing! Cheers