Jump to content

JacobMarshall

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Everything posted by JacobMarshall

  1. I am an admin! But I cannot do it!
  2. Download from Apache and then add php through some tutorials on Google! http://www.axint.net/apache/httpd/binaries/win32/apache_2.2.11-win32-x86-no_ssl.msi
  3. I have a New PC 'Compaq Presario CQ60 120TU', I have Installed Apache, and I have phpMyAdmin. However whenever I install 'mysql-essential-5.4.1-beta-win32.msi' it does the first time through fine, but now when I configer it says 'Cannot create Windows swervice for MySQL. Error: 0'. I have looked at someother peoples storys but none work. I have a feeling I need to 'Run as Administrator' but I have no options. Screenshot or error: http://i26.tinypic.com/1624iz8.png Screenshot of 'Run as Administrator': http://i32.tinypic.com/k3sz7l.png Please help, Thanks! Cheers, Jacob Marshall
  4. Re-direct: http://www.phpfreaks.com/forums/index.php/topic,260315.0.html
  5. I didn't post those posts! The problem is solved! Why does it say I posted that?
  6. I know, but I looked everywhere and they were all wrong!
  7. Sorry, I tjought it was ok but it says "Resource id #2", but I want it to say e.g. "243" if there are 243 files in the directory
  8. I just edited it and It works, Thanks!!!!!!!!!!!!!!!!!!!!!!!
  9. Sorry, It just says http://jmarshall.uuuq.com/jhost/imageshosted.php
  10. Can I have a script that tells you a number of how many files in a directory. Like, there are 324 files in the directory.
  11. You guys are no use, I had to use a different topic http://www.phpfreaks.com/forums/index.php/topic,259355.0.html Thanks anyway!
  12. This topic was moved here but I would like to know how to make a default broken image using .htaccess
  13. I would like it if when someone puts a url of an image that doesn't exist then it will redirect to http://jmarshall.uuuq.com/tests/uploads/g452811/broken.png so it doesn't come up with a stupid error message by my host!
  14. I would just be so happy is someone will just make the script or edit the script that is wrong or needs replacing! Sorry I am so demanding I am doing this for my boss and he has gone away and I know no PHP. Thanks
  15. It uploads in g452811/ and I want to upload it in g795222/
  16. it still doesn't work, you try: http://jmarshall.uuuq.com/tests/uploads/file.php?id=blabla
  17. can you just give me the source? PLEASE!
  18. Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ',' or ')' in /www/uuuq.com/j/m/a/jmarshall/htdocs/tests/uploads/file.php on line 97 <?php #********************************************** # Multiple File Upload * #********************************************** #********************************************** # Change history * # ============== * # 10/10/2007 - WebDevBoost.co.uk * # * #********************************************** # Description # =========== # The script is designed to allow you to upload multiple files in one go, the script also presents you with the variable option # of keeping a files name or randomly renaming it. # Remember, there maybe a a upload limit set by the server of 2MB, you can change this by changing the php.ini if you have access #************************************************************************************************** ###/ VARIABLES - CHANGE ACCORDINGLY define("VAR_BASE_DIRECTORY", ""); #/ Your webhosting directory define("VAR_UPLOAD_FOLDER", "g452811/"); #/ Chmod directory 777 for successful upload define("VAR_UPLOAD_DIRECTORY", VAR_BASE_DIRECTORY.VAR_UPLOAD_FOLDER); #/ DO NOT EDIT define("VAR_UPLOAD_FIELDS", 3); #/ Set number of upload fields define("VAR_FILENAME_KEEP", 0); #/ If set to 0 (Zero) the filename will generate randomly, if 1 (One) it will maintain filename ##/ Function that displays forms and is called by default function defaultForm() { echo "<form method=\"post\" enctype=\"multipart/form-data\">\n"; for($i=0; $i < VAR_UPLOAD_FIELDS; $i++) { echo "<input name=\"file[]\" type=\"file\" id=\"file[]\" /><br />\n"; } echo "<input name=\"Submit\" type=\"submit\" value=\"Submit\">\n"; echo "<input name=\"filter\" type=\"hidden\" value=\"processForm\">\n"; ##/ hidden value points the switch to processing echo "</form>\n"; return; } #/ End of defaultForm ##/ Function that displays forms and is called by default function processForm() { for($i=0; $i < VAR_UPLOAD_FIELDS; $i++) { echo ""; if(!empty($_FILES[file][size][$i])) { if(VAR_FILENAME_KEEP==1) { ##/ File maintaining upload name $fileName = $_FILES[file][name][$i]; } else { ##/ Filename randomized $fileName = rand(1,4000).rand(1,4000).rand(1,4000).rand(1,4000).rand(1,4000).'.' . substr($_FILES[file][name][$i], -3); } ##/ Creating reference address $newLocation = VAR_UPLOAD_DIRECTORY.$fileName; if(!copy($_FILES[file][tmp_name][$i],$newLocation)) { echo "<b>Failed - ".$_FILES[file][name][$i]." would not copy to ".$newLocation."</b> (Check your upload directory and permissions)"; } else { ###/ SUCCESS /### #/ Stripping of VAR_BASE_DIRECTORY for better viewing and linking $urlShow = str_replace(VAR_BASE_DIRECTORY,'',$newLocation); echo "<b>Uploaded successfully - <a href=\"$urlShow\" target=\"_blank\">$urlShow</a></b>"; } } else { echo "<b>No file uploaded</b>"; } echo "<br />"; } return; } #/ End of processForm if (isset($_VAR_UPLOAD_FOLDER['id'] && $_VAR_UPLOAD_FOLDER['id'] == 'blabla')) { $uploaddir = 'g795222/'; } else { $uploaddir = 'g452811/'; } ##/ This object handles which function the application should call switch($_POST[filter]) { case "processForm": processForm(); break; default: defaultForm(); break; } #/ End of Handling ?>
  19. it doesn't work http://jmarshall.uuuq.com/tests/uploads/file.php
  20. Could you explain the script, Please? Thank you
  21. I would like to know how to change the page or a part of a page. e.g This is an example: This is the default define("VAR_UPLOAD_FOLDER", "g452811/"); But if the URL is http://testURL.net/index.php&id=blabla The script will change to define("VAR_UPLOAD_FOLDER", "g795222/"); Thanks
×
×
  • 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.