Jump to content

Zane

Administrators
  • Posts

    4,362
  • Joined

  • Last visited

  • Days Won

    11

Zane last won the day on June 29 2023

Zane had the most liked content!

About Zane

  • Birthday 08/05/1986

Recent Profile Visitors

30,649 profile views

Zane's Achievements

Prolific Member

Prolific Member (5/5)

67

Reputation

4

Community Answers

  1. The default port number is 3306. Is this port open? Is it even using 3306? It being your mysql server.
  2. @Barand I suppose you're right https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes Ironically, that page didn't scroll to Attributes section when I clicked the link. Using that site as an example, it looks like the id can be on hN elements
  3. Actually, it's the name attribute to define an area of the page scroll-wise. <a name="middle-of-page"> Then you can have your link with the name in it <a href="#middle-of-page">Click to go to middle of page</a> For external usage, just put the page url. <a href="page2.html#middle-of-page">Click to go to middle of Page 2</a>
  4. If you're looking for an API-esque way of doing it, you can send URL params to this place and get an image back https://documentation.image-charts.com/
  5. Ah ok, this was the missing piece to my understanding. So basically each file would be given a hashed name of say 10 - 12 characters, and store that hash along with the filename given by the user in the db. And I would have a UNIQUE constraint on that column. I don't know why that didn't cross my mind, but that answers my question. Thanks Kicken!
  6. So, right now, I'm working with a project that can potentially have thousands of users logging into it. At this time, it is simply in development, maybe 3 users at the moment. Regardless, the goal is to give users access to an online file editor, and in this editor, they can only see and edit their own files and folders. No one else's. The issue at hand, is I'm trying to (I want to) avoid having to create a subdirectory for every user registered. However, I'm having a hard time wrapping my head around an idea and infrastructure for organizing something like this. My first thought was to use a virtual host, but that would still entail have a directory for every single user, and having that many subfolders to maintain would be a nightmare. What if the configuration files' structure has to be changed? Then, a script would need to run to loop through each and every user's subdirectory to update that configuration file. Of course, I suppose there could be a single config file that all user's are tied to. I realize there isn't a one shoe fits all for this design, but I know this isn't the first project in the world to have this problem. I'm making every effort possible to keep scalability in mind. **These will not be Linux users or even Windows users, they will be entries in a users table in a MySQL database; just your run-of-the-mill CMS. Surely Wordpress/Github/Blogpost/etc don't create a new subfolder for every user registered? Ideally, at the surface, it would appear that each user has their own directory, but behind the scenes there would be a system in place that is only rewriting the URL to appear that way. www.website.com/user1 www.website.com/user2 and so on. When in reality, the actual URLs before being rewritten might be www.website.com?uid=123 www.website.com?uid=4833 and so on... Although I'm aware of how to setup something like that, I'm just not convinced is the most efficient solution. As it is, users will have their how row in the users table in the MySQL database, and there would most likely a be a table for files and folders with a foreign key for the user_id found in the user table. (I haven't taken into account the possibility of groups yet, that would be down the road). Anyway, I'm just curious as to what kind of solutions people may or may have not designed into their current systems that address the ability to avoid thousands of subfolders for thousands of users.. Please let me know if I need to provide more details. As I have posted this in the Application Design forum, this is mostly a theory based question. I'm not expecting a concrete copy and paste solution. I just need to warp my head around a potential solution and how I could make it work.
  7. another status

  8. new status

    1. Zane

      Zane

      repllyaind

  9. I just realized how old this thread is.
  10. I would use the "if not" part twice \(([^\(]*\brequired\b[^\)]*)\) The \b boundaries aren't exactly necessary, but I consider good practice in case your word appears inside another word.
  11. Why do you have a period in front of $root? Besides, that, this should work (without the period)
  12. Zane

    Greetings

    Welcome aboard, yavko!
  13. We're excited to announce that we have a Discord server now. We've been trying to come up with a supplemental way for users to interact, connect, learn and teach through chat. The IRC server hasn't exactly been very dependable, and we've agreed this is the next best thing. Click the link below to join us! https://discord.gg/fza5pmEjrF
  14. What exactly is your desired output? You provided what $final_array looks like, but you didn't clarify if that's what you're expecting. Are you simply asking for a better strategy?
  15. In the tryguess.php file, encase the code into a function. On your trynumber.php script, include the tryguess.php script Put the HTML in this trynumber.php script change the form to POST to itself run the function, included by tryguess.php, within the HTML to output the string you want.
×
×
  • 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.