Jump to content

Adam

Moderators
  • Posts

    5,717
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Adam

  1. It's not that MySQL can't "handle" them. Single and double quotes are used to indicate a string, where as back-ticks indicate the name of a database, table, column name, etc. It's like asking why an ampersand can't be used instead of an equals sign when comparing values. They're normally not actually required either by the way. Only if the `name` in question clashes with a reserved word, then they're required so that MySQL knows it's the name of something.
  2. I've never come across this issue before, and I've built a fair amount of web-based mobile apps. Could you provide a link or an example that reproduces the issue?
  3. Correct. I wouldn't ever trigger another error in that situation because you know one has already been triggered. I don't really agree with the PHP docs for having that example. As I edited my last post to say, you shouldn't ever really be encountering user triggered errors in your production environment, because they imply bad configuration, bad connection or something dev wise has not gone right. PHP will automatically trigger warnings appropriately and bomb out in most situations though. Nothing should make it to a production environment if it's triggering user errors.
  4. Even when "display_errors" is on, errors will still be logged. It depends on the environment you're in Fluoresce. In a development or testing environment, you will want to log as much as possible to help with debugging. It's up to you if you have "display_errors" enabled or not, but personally I prefer to have them all logged into a file and tailf it so I can monitor them. As for the constants, you don't generally want anything in the production logs except stuff you really need to know about. During dev/testing you should clear the less important notices out before even releasing, so you should be okay with: // Report simple running errors error_reporting(E_ERROR | E_WARNING | E_PARSE);As for development, you want absolutely everything reported, so you want: // Report all PHP errors error_reporting(-1);You shouldn't really ever be getting E_USER_* errors in production.
  5. Why don't you have index.php (or every page) display the splash page instead of the normal site when the user doesn't have a cookie set? Seems a better safe guard than relying on them going through the home page, given it's a disclaimer. Also means you don't have to mess around with Apache configuration to go against the normal behaviour.
  6. Can't say I agree. Most people hated the new iOS design, but after they started to use it and realised the new usability/subtle improvements they started to like the update. People don't know what they want, basically. It's down to those that know better to give them what they don't know they want.
  7. Worth pointing out that decent frameworks can teach you a trick or two about how to structure your applications. Laravel is a good one, and relatively easy to learn too compared to something like Symfony's framework. I would learn as much as you can from them, while helping you build applications quick, if you're going to use one.
  8. Sounds like Apache is blocking access, not a file permission issue. If you're using Apache >= 2.4.6, you need to permit access to the directory in the Apache config with: <Directory /path/to/files> Require all granted </Directory> Prior to that you need to use: <Directory /path/to/files> Allow from all </Directory> You can, and possibly should, improve the specificity of those directives though. Read here for more help on how to use them.
  9. Debian uses "apt" as its package manager. Googling for "apt install TesseractOCR" and "apt install imagemagic" will generally give you the package name to install (if it exists), or you can use `apt-cache search <keyword>` to find packages from the command line.
  10. * Not keen on the mix of fonts. Mainly the one used in the nav, but I don't think any of them work particularly well together. Maybe Google for some nice font combinations; Google Web Fonts has a good selection to choose from. * The slogan in your logo reads a little repetitive having "design" in there twice. I would either use a synonym or go with something different. * I don't think the background image you've used goes with your "clean + simple" headline. I removed it with the web inspector and I preferred it plain white. I would look for a better one; try subtlepatterns.com. * The nav is a little odd when you click "Contact Me" and it loads the "Who I am" page and jumps to a contact form. Just a minor usability issue to think about. I've been working on a portfolio myself recently, it's not done by any means, but maybe go with a similar chasing nav and have everything on one page.
  11. I would disagree. If you're promoting yourself as a designer, then your own website should be a decent example of what you can do, no cut corners. Plus any potential employers looking for say, mobile developers will of course check the site on their own phone. I also wouldn't rule out employers just using their phone to look into you anyway, not in this day and age.
  12. You're binding the event on every call to new_message(). That means every time its called, there will be an additional listener triggering the alert(). Just move the bind into the document ready code, or add some logic so that the bind code is only called once.
  13. No. They're built with completely different SDKs, there's bound to be various bugs and differences between the two. It will give you a decent idea though, and you can always ask in the Beta testing board for people with iOS devices to give it a test for you.
  14. Yeah that's a fair point. I was just highlighting the actual code for it, in-case the OP was lost in the rest.
  15. You're not requesting a file directly from your computer using the file:// protocol, are you? What's the exact URL you request originally compared to the URL requested via AJAX? Use the network tab in developer tools to get it.
  16. Is that definitely the right code? You should never get same origin policy errors with relative URIs.
  17. Put simply: str.split(' ').length;That will return you the word count.
  18. They're referring to the original MySql extension - the functions starting with "mysql_" - and they're right, you shouldn't be using it now. As of PHP5.5 it will be deprecated, and completely removed in a future version. Given you're creating a new website though, you can just use MySQLi or PDO from the start.
  19. I would imagine that your shared hosting provider will only be installing the Git client, not the server. You still need a Git server, like GitHub, BitBucket, or Gitosis installed locally.
  20. PHP developers quite often work with HTML/CSS and JavaScript though, and I will say that I find Chrome far better than any other for debugging and inspecting that.
  21. Please be more specific. What's not working? What errors are you getting? Do you have a demo we can look at?
  22. Whitespace doesn't matter in JSON. Assuming what you've cut out with "....." is of valid syntax, your first paste of it will work. What's not actually working?
  23. You haven't provided the script that cycles through the images, only the definition of jQuery.capty() and a call to it.
  24. Use the split() string method to convert the string into an array, and then use splice() to remove the item specified. Remember that array indexes start from 0. You can convert the array back to a string using join().
  25. A user is linked to a session using a cookie. The cookie only contains a hash, which can be used to look up the file containing the serialized session data, generally in /tmp. When your browsers closes it will delete the cookie, therefore the user's session is lost. However the file in /tmp containing the actual session data will remain there until it's expired, and subsequently PHP has cleaned it up.
×
×
  • 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.