Welcome Guest, Not a member yet? Register   Sign In
Problem in using the upload class
#1

[eluser]hz[/eluser]
hi,i've tried alot to use the upload class. but it is not working. when i click the upload btn. it dislays the error "The upload path does not appear to be valid". i've change the upload_path but still the same error msg appear. can anybody tell me wat to do. i've also mentioned the base_url = "http://testserver/hasan/"
#2

[eluser]Unknown[/eluser]
check if the upload path is writable
#3

[eluser]Chris Newton[/eluser]
Also, I'm pretty sure the upload path has to be relative to the script, due to PHP restrictions (../../file_folder) not (http://mysite/file_folder). I don't think you can use base_url or site_url. You might be able to use $_SERVER["DOCUMENT_ROOT"] though.
#4

[eluser]dejitaru[/eluser]
manhuti is right, you cannot set your upload path as http://www.something.com, you should specified the path on the server, por example:
my url: http://www.mysite.com
my upload path: /home/users/~dejitaru/www/uploads
you can get that addrees by printing the $_SERVER["DOCUMENT_ROOT"];

test.php
----------------------------------------------
<?php

echo $_SERVER["DOCUMENT_ROOT"]; ?>
-----------------------------------------------
this will give you the path in the server where your account is located




Theme © iAndrew 2016 - Forum software by © MyBB