Jump to content

ratcateme

Members
  • Posts

    1,216
  • Joined

  • Last visited

    Never

Everything posted by ratcateme

  1. i put this in my script before the move_uploaded_file $last_line = system('ls -Z /tmp', $retval); echo $retval; echo $last_line; echo '</pre>'; and got this -rw------- apache apache phpStXMhI 0-rw------- apache apache phpStXMhI the file name is the same as the one in the error message Scott.
  2. thanks for the help my letters directory is in the same as my script i tried your suggestions changing my code to move_uploaded_file($_FILES['file']['tmp_name'],'./letters/'.$id.'.html'); and to move_uploaded_file($_FILES['file']['tmp_name'],'letters/a'.$id.'.html'); and move_uploaded_file($_FILES['file']['tmp_name'],'./letters/a'.$id.'.html'); But got nothing i have an image upload script in the same directory that uploads file to a different directory and it works fine Scott.
  3. i changed my code to if(is_uploaded_file($_FILES['file']['tmp_name'])){ move_uploaded_file($_FILES['file']['tmp_name'],'letters/'.$id.'.html'); }else{ echo 'Not uploaded'; } but i got the same error so my is_uploaded_file returns true my $_FILES array is Array ( [file] => Array ( [name] => Untitled-1.html [type] => text/html [tmp_name] => /tmp/phpAmS6tC [error] => 0 [size] => 344 ) ) Thanks Scott.
  4. Have you looked at the GD library you could use the php imageline() function to create a graph Scott.
  5. I have a script with this line. move_uploaded_file($_FILES['file']['tmp_name'],'letters/'.$id.'.html'); i can output the id number file and the error shows it knows the id number my letters directory is 777 but i get this error Warning: move_uploaded_file(letters/4.html) [function.move-uploaded-file]: failed to open stream: No such file or directory in /var/www/html/news.inc on line 34 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/php7lQTBL' to 'letters/4.html' in /var/www/html/news.inc on line 34 i have tried to use full paths and other things but nothing worked Please help Thanks Scott.
  6. Hi i have a file with html code in it like <table width="200" border="0" class="a"> <tr> <td colspan="2">Welcome $_SESSION['name']</td> </tr> <tr> <td colspan="2"><a href="?page=usercp">User panel </a> | <a href="javascript:void(0)" onclick="xajax_logout()">Logout</a></td> </tr> <tr> <td>Last login:</td> <td>$last</td> </tr> </table> i have a function to open into php as one string and i want to use a function like eval that will get $_SESSION['name'] and $last i thought i could use $str=importfile('pages/logedin.inc'); eval("\$str = \"$str\";"); now i know it is not my importfile script i can echo $str fine but it displays as $_SESSION['name'] not a user real name and i need a function to get the real name and lastlogin can you please help Thanks Scott.
  7. Thanks that fixed it Scott.
  8. Hi i am running PHP 5.2.3 on Ubuntu Server 7.10 now it does not come with the GD Library installed. Now i downloaded and extracted the files onto the server i am just no sure how i am meant to install them i cant find any .so files and the readme says run config but that gets an error stright away Can you please help Thanks Scott.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.