Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - stevon8ter

Pages: 1 ... 21 22 [23] 24 25 ... 48
331
TI Z80 / Re: [2012 Apocalypse Contest] Battle 4000
« on: November 25, 2012, 05:58:31 pm »
Cool ;p good luck

332
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:57:49 pm »
Hmmmmmmm i don't really know

But if you trust me, send me all data needed to login to server (in a pm) and i'll look into it...
(I hope you trust me, i'll do nothing wrong)

333
TI Z80 / Re: [2012 Apocalypse Contest] Battle 4000
« on: November 25, 2012, 05:55:56 pm »
Looks realy cool ;)
What does the left down house do?

334
TI Z80 / Re: [2012 Apocalypse Contest] Battle 4000
« on: November 25, 2012, 05:43:50 pm »
Ok :p
So sprites are the best just when having 1 or 2 sprites on the screen and you don't want to hardcode them, and have them all in a routine. Ok i get it

335
News / Re: 2012 Apocalypse TI-83+/TI-84+ Programming Contest
« on: November 25, 2012, 05:40:00 pm »
Hahahaha lol

If i'dd participate in a contest, it would also be just for fun, i like exp xD

336
TI Z80 / Re: [2012 Apocalypse Contest] Battle 4000
« on: November 25, 2012, 05:37:19 pm »
Lol
But it's not good for tilemapping xD
Tilemap tiles are best when they are like: line(...) ?

337
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:36:10 pm »
Hmmm i tested my script and for me it worked :/
But remove all comment lines...
And at the mkdir($path);

Do mkdir("uploaddir/" . $path);

338
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:31:44 pm »
Are you sure you saved it correct the script? Cause when i look in the source it's an empty file...

339
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:25:53 pm »
hmmmmm let me think...
(Is it already on a server or on xampp or so?)

1st : put " " in the allowedexts array instead of ' '
2nd try removing all coments ( /*...*/ )

340
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 05:23:04 pm »
First question, is the php part in a different file as the html form?
2nd: is the php part in the uploader.php file?

341
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 04:18:17 pm »
1) sorry for double posting but i concidrr this as an update

Html form:
Code: [Select]
<form action="uploader.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<input type="submit" name="submit" value="Submit" />
</form>

Php script:
Code: [Select]
<?php

$allowedExts 
= array(/*all allowed exts go here*/);
$extension end(explode("."$_FILES["file"]["name"]));
if ((
$_FILES["file"]["size"] < 10485760 /* file size*/) && in_array($extension$allowedExts))
  {
  if (
$_FILES["file"]["error"] > 0)
    {
    echo 
"Return Code: " $_FILES["file"]["error"] . "<br />";
    }
  else
    {
    
$random_digit=rand(0000,9999);
    
$pathnew $random_digit $_FILES["file"]["name"];
    echo 
"Uploaded file name: " $pathnew "<br />";
    echo 
"Size: " . ($_FILES["file"]["size"] / 1024) . " Kb<br />";

$path=random_digit;

    if (
file_exists("../upload/ /*or whatever the upload dir is*/" $path "/" $pathnew))
      {
             
$lol 0;
while (
$lol === 0)
{
      
$random_digit=rand(0000,9999);
    
$pathnew $random_digit $_FILES["file"]["name"];

$path $random_digit;

if (
file_exists("../upload/ /* again whatever upload dir is*/" $path "/" $pathnew))
{
$lol 0;
}
else
{
$lol 1;
}
}
      }
    else
      {
     
mkdir($path);

move_uploaded_file($_FILES["file"]["tmp_name"],
      
"upload/" $path "/" $pathnew);
       }
    }
  }
else
  {
  echo 
"Invalid file";
  }
?>


I made a few changes to try to let it work with newdirections, but didn't test it
So please report all errors ;)

342
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 03:16:46 pm »
Ok, you need the mkdir() command for that, but i'll explain it later...

343
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 03:06:50 pm »
And what do you mean with textfiles?
That you upload a video + textfile and that they have to be linked together?
Yeah I was thinking they'd both go in a folder together inside of the uploads directory
so you mean for every video that's uploaded... create a nex folder?
ie: if i upload 1st video, create a folder of itself called vid1 ?

344
Web Programming and Design / Re: PHP Upload
« on: November 25, 2012, 03:03:00 pm »
Do you mean make folders on your website or do you mean make a folder on the server?
And what do you mean with textfiles?
That you upload a video + textfile and that they have to be linked together?

345
TI Z80 / Re: [2012 Apocalypse Contest] Battle 4000
« on: November 25, 2012, 02:08:18 pm »
Ok thx ;) and that's smaller/faster...?

Pages: 1 ... 21 22 [23] 24 25 ... 48