Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. Without a doubt. The whole world's going digital...
  2. Oh aye, no worries. Trust you have a billion dollar satalite I could borrow to take a few snaps o' Earth first like?
  3. This would imply you're the designer.. In actual fact just sounds like you're trying to take credit for someone else's work.
  4. I'm a little dubious about this to be honest, no offence. I did take a look at before it went offline, and judging by your preview designs I don't see how you managed to pull that off yourself.
  5. HTML is a free-form language, in that it doesn't preserve whitespace by default. To force it to preserve it you can rap the text in a <pre> tag, or apply white-space:pre; to the wrapper element's CSS... Assuming you meant to preserve tab characters and the like?
  6. If you don't mind using third-party software I'm sure you'd be able to find something for free on Google..
  7. Look into file_get_contents..
  8. You can just pass the class name as the object: method_exists(ClassName, methodName)
  9. I'm guessing you're after something like: echo '<span style="color:red;">Hello</span>: ' . $addr . '<br />' . "\n"; ..?
  10. Iframes are fixed height, re-sizing the div would have no effect -- unless you have some JS in place to alter it? Personally I'd put my effort into removing the need for an iframe, do you really need to use them?
  11. I'd make sure you have errors displayed. Add this to the start of your code: error_reporting(E_ALL); ini_set('display_errors', 1);
  12. In what way does it not work.. blank screen, errors?
  13. Yeah remove the HTML from getExtension.php. Just after $ext = getExtension($name);, add in: var_dump($name); var_dump($ext); Just to check the values are what you're expecting (remove them after).
  14. You'd need a way of identifying that input.. A name or ID would be helpful.
  15. Why have you add HTML header and footer tags to getExtension.php? Anyway not the cleanest code but does seem to work. Did you try the var_dump?
  16. For "typ_skanu" (assuming you mean the select value), you should be using $_POST["typ_skanu"]. Only type="file" inputs would be in the $_FILES array. And yes, "tmp_name" is a standard $_FILES key for file inputs. Take a look at the PHP manual (about a quarter down the page) for more info on $_FILES. To replace how you currently read the file: $hndl=fopen($_REQUEST["skan"],"r"); $isize=sizeof($_REQUEST["skan"]); $imgdata=""; while(!feof($hndl)){ $imgdata.=fread($hndl,$isize); }; $imgdata=addslashes($imgdata); You could just use: $imgdata = file_get_contents($_FILES["skan"]["tmp_name"]); $imgdata = mysql_real_escape_string($imgdata);
  17. You want to find the name attribute of what? You could use a regular expression, but you'd need to make it much more specific to find what you want. You'd probably be better off using the DOM extension..
  18. As of PHP4.3 $_FILES information was removed from $_REQUEST, so you need to use $_FILES['skan'] instead.. Though you shouldn't be trying to create a file handle on an array anyway, you should be using the 'tmp_name' key: $hndl=fopen($_FILES["skan"]["tmp_name"],"r"); An even better solution would be to just use file_get_contents to reutrn the file data, and then mysql_real_escape_string to escape it. Of course you should be checking the upload was successful too..
  19. Have you tried a var_dump on the $name and $ext variables before you pass them to the function? Since the $name variable looks like it should be correct, my guess would be the problem's with getExtension() - but we're unable to see the code.
  20. OOP doesn't really matter here. If you're using a DB object to then you'd need to provide details on how it's used, or what it's called if it's well known. Are you saying you're wanting to return a category, plus it's sub-categories, without needing multiple queries?
  21. Can you tell us what's not working with it?
  22. Change the regexp to:
  23. Have you tried file_get_contents ?
  24. I see. What were the reasons for demotion?
  25. Why did it happen?
×
×
  • 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.