php - Uploadify - files not showing up -
I'm trying to use Uploadify (a jQuery plugin) with my CakePHP app. Locally (WampServer), it works great, but when I try on my live server, files do not appear, I've pasted the folders correctly, checked the paths, etc., and I can not understand why this is not working. Here is upload.php:
if (! Empty ($ _ files)) {$ tempFile = $ _FILES ['filedata'] ['tmp_name']; $ TargetPath = $ _SERVER ['DOCUMENT_ROOT'] "/ apps / webroot / posts / temporary /"; $ TargetFile = str_replace ('//', '/', $ target path). $ _FILES ['Filedata'] ['name']; $ TargetFile = str_replace (".", "_". Mt_rand (1000000099999999). ".", $ TargetFile); Move_uploaded_file ($ tempfile, $ targetFile); } "1" echo;
This script is definitely being run, but I have seen the specified folder (and on all file systems), and the uploaded file (buses) is not visible right now! This is driving me crazy - hopefully someone has responded to this. Please tell me why I should post more codes, and I will.
You $ targetpath therefore this is relative to the document rather than the exact server path. A while ago I had a similar problem.
Comments
Post a Comment