[PHP] Check valid chars in string

2002-12-02 Thread magnus nilsson
function valid_chars($file_name) { for($i = 0; $i < strlen($file_name); $i++) {   if (!in_array($file_name[$i], array('q','w','e','r','t','y','u','i','o','p','l','k','j','h', 'g','f','d','s','a','z','x','c','v','b','n','m','Q','W', 'E','R','T','Y','U','I','O','P','L','K','J','H','G','F', 'D',

Re: [PHP] Upload wont work, OS X

2002-11-29 Thread magnus nilsson
ding']; if($bilde_fil[size] > $MAX_FILE_SIZE) { die("Sorry, Kunne ikke uploade."); } $path="upload"; //Mappa som bildene skal havne i (husk den siste '/') Don't set $MAX_FILE_SIZE using $_POST variables for security reasons - someone could very easil

[PHP] Upload wont work, OS X

2002-11-29 Thread magnus nilsson
I have trouble using upload scripts - none of them work on my current config. I'vq got php 4.2.3 and global registerd = off. The problem is that the script doesnt send the variable $_FILES['my_file'] as it should. I can only upload if i hard code the filename into the script. OS: OS X 10.2 PH