Jump to content

Ingolme

Moderator
  • Posts

    14,894
  • Joined

  • Last visited

  • Days Won

    176

Everything posted by Ingolme

  1. Could you explain in more details what the issue is? What result are you seeing and what was the expected result? Text editors don't usually run SQL unless you have some kind of database plugin for your text editor.
  2. document.lastModified can only show information about the current page. As I mentioned in another topic, you can use PHP's filemtime() function to get the modified date of a file on the server.
  3. If you are loading the file from another website, you have no way to know when it was last modified. To find out the modification time of a file, it has to be on your server. The ?ver=2.0 probably is just there so that older versions of the file are not loaded from the browser cache.
  4. The issue is that you should not have an <ol> tag as a direct child of another <ol> tag. It runs into an <ol> and stops counting there. Your structure should look like this: <ol> <li>text</li> <li>text</li> <li>text <!-- ol element wrapped in this li --> <ol> <li>text</li> <li>text <ol> <li>text</li> <li>text</li> <li>text</li> </ol> </li> <li>text</li> <li>text</li> </ol> </li> <li>text</li> <li>text</li> </ol>
  5. The TypeScript features are there to help you keep all of your types in check while you are writing your code. Once the code has been compiled, type checks don't need to be done at runtime.
  6. That's not a tutorial, it is a reference page. References provide technical details about a function for somebody who already knows how to use functions. The reference expects your code to have access to a getID3 object, which does not appear in the reference manual, so it probably is an external resource. If you just want to know when a file was modified, PHP has a built in function filemtime() which returns a UNIX timestamp. the date() function can turn the UNIX timestamp into a meaningful string.
  7. I have little experience with TypeScript, but I assume that TypeScript would have shown you an error if you had tried to call add() with a string before converting it to plain Javascript. If you are using TypeScript, you should write all of your code in TypeScript rather than converting to Javascript and then writing more code. I expect it will handle type checking as long as you are working in the TypeScript environment.
  8. That is a terrible idea. The <object> tag is not very good at displaying websites, while the <iframe> is designed for that purpose.
  9. CSS cannot obtain metadata from files. Even Javascript cannot do that, you would need a server-side language to get that information and display it on the page.
  10. Ingolme

    having a website

    There is a trade off between difficulty and customization. The easier it is to make a site, the less ability you have to customize it. If you want to make the site yourself, you could use a platform like Wix or SquareSpace which can make sites without any knowledge of web languages. If you want full control over the site's customization without learning web languages, you should hire a web developer to make it for you.
  11. Form elements cannot have HTML inside of them.
  12. You can do that, but it requires Javascript. It's referred to as AJAX when you send a request to the server without reloading the page.
  13. PHP cannot operate without refreshing the page, but the data is sent to the server, so you can use that data to populate the form. If you want to do operations without refreshing the page, you cannot use PHP, you will have to use Javascript.
  14. How exactly is that supposed to solve the styling issue?
  15. You can't json_encode an XML object. Use the SimpleXML element methods to traverse the XML tree and add the information. Take the time to read and understand how the simple XML library works so that you can achieve your goal.
  16. You can set the action attribute of the form to point to the same page and then have PHP check for form data to determine when to change the content on the page.
  17. This code just shows a form on the page. Where is the code that does the form processing?
  18. SQL's only purpose is to manage databases, it cannot read or write to files. You need a separate programming language to do that. If you are working in PHP, you can extract the data from the database the normal way, then use DOMDocument to edit the XML and save it to a file.
  19. The carriage return + line feed characters should be 0D0A, 25 is a % symbol.
  20. I wonder if it is even possible. This is not the kind of task that PHP was designed for. It may need to be installed along with a specific extension or it might need to run a compiled executable. Something I would have to do more research on when I have a bit more time. Meanwhile, is your task something that can be done using PHP's GD library?
  21. The update() function will run when the page loads (it is being passed as an argument to the ready() function) , but it won't find the elements because they don't have id attributes.
  22. There is no specific name for that, but you can do it in Javascript with a combination of string manipulation functions and timing functions. In the programming world, most things are not done right out of the box and you often have to solve completely new problems on your own. This is why it is important to learn all the basics of programming which gives you the puzzle pieces you can fit together in different ways to solve any problem. This is not too difficult of a task to achieve once you are familiar with Javascript and the DOM.
  23. PDO is a native PHP class, so libraries and frameworks are not going to try to build their own version of it. You need to make sure that PDO is installed along with PHP, if you cannot do that then you cannot use this library.
  24. There are instructions for installing PHP with PDO here: https://www.php.net/manual/en/pdo.installation.php
×
×
  • Create New...