• Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by Ingolme

  1. The table in the Wikipedia article states exactly what all the additional bytes are. I'll just copy what's in the article here for you and show your bytes next to them: 2 bytes: Number of this disk 0x0000 2 bytes: Disk where central directory starts 0x0000 2 bytes: Number of central directory records on the disk 0x0002 2 bytes: Total number of central directory records 0x0002 4 bytes: Size of central directory (bytes) 0x0000006F 4 bytes: Offset of start of central directory, relative to start of archive 0x00000984 2 bytes: Comment length (n) 0x0000 n bytes: Comment
  2. According to Wikipedia, 50 4B 05 06 marks the start of the End of central directory header which contains some information about the ZIP file.
  3. The web root is the folder on the server which contains your website. It could be called "www", "htdocs", "html" or a variety of other names. Anything inside that folder can be accessed through HTTP with a URL. If the file is outside the web root, you won't need htaccess to protect it because it's already inaccessible.
  4. CSS and, by extension, W3.CSS take care of styling HTML. How the HTML was generated (using PHP, handwritten or otherwise) isn't really relevant to how it's used. If you're generating HTML with PHP then be sure to give the correct classes to the elements. My recommendation is to separate the HTML from the actual business logic and put it into self-contained template files which are included using PHP after everything has been processed.
  5. There's an :after pseudo-element with a background color the same as the page's background color which is positioned in front of an unsplit border.
  6. I'd have to see your code and what the validation errors say to tell you how to fix it. If you're using microdata attributes it's not going to validate because it's using non-standard attributes. I recommend JSON-LD for structured data.
  7. It says in your editor that the exception occurred in at line 77. You should check to see if the variable row1 is null.
  8. The console should tell you exactly on what line the exception occurred.
  9. You're going to have to tell me what line its on, but usually that means you tried to use an object that wasn't initialized.
  10. The W3Schools tutorials for PHP and SQL have all the information you need. If you need help with something specific in the code you can ask questions about it here.
  11. The syntax source: availableTags is not proper Javascript. If "source" is meant to be a variable you would write source = availableTags; Even if you do assign something to a variable named "source", you're not using the variable anywhere so it wouldn't do anything.
  12. Unless specifically programmed otherwise, the server will serve the same content to everybody. If you have a PHP file that can manipulate files or the database then it's open for everybody to use and is an easy attack vector on your website, if you want to prevent other people from using it you will have to add some form of authentication. In summary, nothing is stopping me from sending a POST request to your web host.
  13. The superglobal is like any other variable in the PHP process, it only exists during the time the script is running. If you want to store its value permanently somewhere you can use a database or write it to a file. If you want to store something for one user during a browsing session you can use PHP sessions.
  14. A super global is available during the execution of the process. What do you mean by passing it to another file? If the file is included, it has access to all the superglobals of the file that included it.
  15. The PHP GD library can't open TIFF files, but it looks like ImageMagick can. If you don't have access to ImageMagick then you'll have to go through the tedious work of building a TIFF reader that parses binary TIFF files and extracts information from them.
  16. The RSS file can go anywhere you want, you just have to tell people where to find it. As I mentioned earlier, you can tell browsers where to find a feed by putting a <link> tag in your HTML page. There's no real best practice as to where to place your RSS feed files. I think RSS feeds have to use absolute URLs in the <link> tags including protocol and domain name to point to the location of the files. If you want a URL like "/feed" for your RSS feed you would have to use URL rewriting on the server, a regular URL would look like this instead: "/feed.xml" or "/feed.rss".
  17. It looks like the openCity() method takes into account all the tabs in the document rather than the ones inside the modal, you should update the openCity() function to select tabs inside the specified model which you can do by either checking ancestor nodes of the clicked element or passing the ID of the modal as a parameter to the openCity() function. You also need to change this line: document.getElementsByClassName("tablink")[0].click(); You have to call the click() method of the first "tablink" in each modal rather than calling it only on the first one in the whole document.
  18. I would need to see your code to figure out what the problem is.
  19. Do you know how to write PHP code for MySQL queries?
  20. How are you writing your PHP? PHP has several different database libraries, which one are you using?
  21. e.preventDefault() stops the form from submitting which would reload the page. e.currentTarget points to the form itself, which is the element that fired the submission event. You need to understand Javascript events. Here's the description of addEventListener() and the use of the currentTarget property of the event object: I'm amazed there isn't a proper simple tutorial online that explains addEventListener() and the event object clearly. I created the query variable to make a query string to send to the server. The query string contains all the form data in key-value pairs like this: "firstname=John&lastname=Smith". This is how you send form data in a way that the server can understand it. The encodeURIComponent() is used to put values into a URL so that the data arrives properly to the server. For example, the "&" symbol is used to separate fields and "=" is used to associate keys with values, so those symbols need to be encoded. This has nothing to do with security, security is handled by PHP. In Javascript, when a function is defined inside another function it has access to the local variables of that other function, it also can only be used from inside the function that contains it.
  22. Just adding "/feed" to a URL won't show the feed. You have to manually put your feed XML in that URL and have your server send the correct content-type type header of application/rss+xml. Like I said, most content management systems will generate this link for you, but if your website isn't using a content management system or the one you're using doesn't have that feature then you will have to create the URL yourself. I can't verify that it's a common practice to use "/feed" for the feed URL, but I know that the CMS I've been working with does that.
  23. Which part of this are you having trouble with? Surely you know how to convert an IF statement to PHP.
  24. Many CMS will generate the feed link, but it's not created automatically by the browser or server. The feed URL should point to the XML file itself. On your website you can add a <link> tag to indicate that there's a feed so that the RSS icon appears in the navigation bar: <link href="... Feed URL ..." rel="alternate" type="application/rss+xml" title="Give a title to your feed">
  25. Browsers provide a Geolocation API, but there's no way to guarantee that it will work properly if the user does not have a GPS. In order to respect privacy, the user is first asked whether they want to share their location with the website, there is no way around that.