Jump to content

Ingolme

Moderator
  • Posts

    14,894
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. You just have to change 'downloads/' for the path to your downloads directory relative to the PHP file in the following lines: if(!file_exists('downloads/' . $file) {......echo file_get_contents('downloads/' . $file);
  2. Try to understand the PHP code. It's not very difficult to understand. I even put comments in it.
  3. Please modify the download.php file to point to the directory you wish to load the files from.
  4. If you do it with PHP, you'll have to always link to the same PHP file and tell it which file to server. <a href="download.php?file=file.jpg">File</a> download.php: <?php// Make sure only files in this directory are accessible by removing slashes$file = str_replace('/','',$_GET['file']);$file = str_replace('\\','',$file);// If the file doesn't exist, show an error message and leaveif(!file_exists('downloads/' . $file) { header("HTTP/1.0 404 Not Found"); echo 'The selected file doesn\'t exist'; exit;}// Tell the browser to download the fileheader('Content-type: application/octet-stream');header('Content-Disposition: attachment');// Output the file dataecho file_get_contents('downloads/' . $file);?>
  5. You have to make the server server them with a content disposition header. This would require a .htaccess file. Put the htaccess file in a folder called "downloads" or something, and put all your downloadable files in there.The .htaccess file <FilesMatch "\.(html|jpg|png|gif)$"> header set Content-Disposition attachment</FilesMatch> Add extensions to the <FilesMatch> expression separated by bars\.(ext1|ext2|ext3|ext4)$
  6. If an element is floated to the left you can't expect it to be in the center. First, remove all the style attributes and move the CSS to the stylesheet. The margin-right: 600px rule is actually messing things up. To center a block element, give it a specific width and then set the margin to "auto"
  7. Make your text editor save the page in UTF-8
  8. BBcode parseing is pretty much more complex than that because you have to deal with nested or unmatched tags.
  9. This thread is five years old! Let it rest.
  10. It depends on the employer.Being honest, if I was an employer I would not give much validity to the certificates, judging by the people of this forum who considered getting one.The ceritificate may show that you memorized some syntax, but doesn't prove that somebody is able to actually solve problems on their own, which is what most of the people seem to be lacking.
  11. It means that your computer does not have the fonts that were used in the PDF. There are two possible solutions: Find and install the fonts onto your computer. Let the program replace the fonts and have it display a little differently than it originally was.
  12. W3Schools is a good place to get started, though there are a couple of bad practises in the examples. People who get further into web development end up finding out the rest on their own. W3Schools is popular because they make their tutorials simple and easy to understand.If it's not on the W3Schools site, the forums are probably the best place to learn.
  13. Hey, this thread is four years old. There really was no need to answer it.
  14. I don't think Internet Explorer uses the attribute correctly, but type should solve the problem: <a type="application/octet-stream" href="clip.mp3">Download here</a>
  15. I recommend against editors with design view. The reason? Even if your page looks good in design view it could look terrible in real browsers.It's best if you download a few browsers and always look at your pages in a real browser.If you don't think that design view is that problematic, count on my word: we've had a lot of people coming here asking why their sites don't work when dreamweaver shows it working correctly.
  16. Ingolme

    Google Links

    Google will eventually index your site, but it takes time.If you want to see more information about how Google indexes your site, go here: http://google.com/webmasters/
  17. Remove window.parent. If this code is in the <iframe> tag itself, the window is still the same window, unless you have a frame within a frame: onload="sizeFrame('myFrame');"
  18. I find Internet Explorer 8 pretty useful. They fixed basically all the problems they used to have and implemented some pretty useful developers tools.
  19. You might want to google "Wordpress" or "Joomla" or other blog software.
  20. Ingolme

    Doctype

    This topic is four years old. It needs no more replies.
  21. Ingolme

    MARQUEE atributes

    It's not just the attributes that aren't valid, the <marquee> element is not part of the HTML specification.If you want scrolling text, you should use Javascript.
  22. Develop in anything but Internet Explorer, but check your site so that it works in all browsers.
  23. There aren't entities for all the other fractions because there aren't more unicode characters assigned to it.You could do something like this: <sup>2</sup>/<sub>11</sub> or use an image.For things like square roots and other more complex things the only thing I know of is MathML and there isn't a lot of support for that yet.
  24. Ingolme

    centering stuff

    Centering vertically is very hard.You can do it with absolute positioning, but your elements will be required to have a defined height.First you have to give the parent element a fixed height. If you want it centered in the whole window, you'll have to use 100% for the html and body elements: html,body { height: 100%; } After that, you have to give your element a fixed height: .myElement {height: 10em;} Then you have to position it absolutely and move it 50% from the top: html,body { height: 100%; }.myElement {height: 10em;position: absolute;top: 50%;} This leaves your element halfway down from the top of the document. Now you have to use a negative margin to move the element back up. You'll move it half of its height: html,body { height: 100%; }.myElement {height: 10em;position: absolute;top: 50%;margin-top: -5em;} Now your element will be centered compared to the window.If you want it centered compared to an element rather than the full window, be sure to make the parent element have a relative position: .parentElement {position: relative;height: 400px;}.myElement {height: 10em;position: absolute;top: 50%;margin-top: -5em;}
×
×
  • Create New...