Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. Only if your data is tabular, yes.If not, no - you should instead stick to NOT using <table> and use something else (like positioning or floats) to achieve a table-like appearance.Ideally, you may just... not care... about IE7. If that's an option. I mean, based on latest browser statistics, IE7 has a worldwide market share of 2.54%.
  2. OpenSSL is required when you want to serve HTTPS pages.So basically, if you don't want to serve HTTPS pages, it doesn't matter which one you get.
  3. I'm pretty sure he doesn't. He's just experienced. It looks exactly the same.
  4. Check if "SELECT * FROM user WHERE email='$user' AND password='$pass'" results in what you think it does. Then, use mysql_error() to find out the actual error message.
  5. The algorithm for summation... or any accumulation of data really... is to have a variable with a default value, and then perform the operation over it, using the notation above.So, you'd have var sum=0; and you'd have an array with all values you want to sum, e.g. var numbers = [1,2,3,4]; Once you have that, you simply loop over the array and add each value to the sum variable. You only output the result once you're done, not during the loop.Think about how would you do this if you were doing it on paper. Imagine you could only perform one adding at a time, and that you can only pick a number if you've labelled the place on the paper that number is at.I don't know what else to say, other than write down the code itself (which does exactly what I just described), but that's not the point here, right?(BTW, for multiplication, your default value will be 1, since 1 multiplied by any number is the number itself, whereas 0 multiplied by any number is always 0)
  6. The folder that you place a file into must exist prior to the renaming, so if you don't already have the "gallery" folder, create it first. You can use mkdir() to create it automatically.
  7. Look into arrays, the for loop and keep in mind that a variable can be part of its own assignment, like: x = x operator y which BTW can also be written as x operator= y
  8. And echo (int) file_exists('C:\wamp\www\alluringassets\img\emvivacesupplemental2012\450pxw\8518_b.jpg'); is still giving 0, yet you're sure it exists in that folder, and is called like that (and not, say ".JPG" or ".jpeg")?You may need to adjust the permissions on the file itself then.
  9. It could be access issue. Try to verify all folders in the path: echo (int) file_exists('C:');echo (int) file_exists('C:\wamp');echo (int) file_exists('C:\wamp\www');echo (int) file_exists('C:\wamp\www\alluringassets');echo (int) file_exists('C:\wamp\www\alluringassets\img');echo (int) file_exists('C:\wamp\www\alluringassets\img\emvivacesupplemental2012');echo (int) file_exists('C:\wamp\www\alluringassets\img\emvivacesupplemental2012\450pxw'); If all is OK, this should output "111111". The first folder where it goes to "0" is the problematic one. On that folder, you'll have to right click, select "Properties", and from the security tab, allow PHP to have access. One foolproof way is to give full access to "Everyone". This isn't a good idea if your computer is running a public facing site, but if it's just a development copy, that's OK.
  10. Define yourself a goal of some sort... like try to make a blogging system, a contact form or something else that you couldn't previously do with only HTML, CSS and JavaScript. Try to break it down to the kinds of things the tutorial talks about. If you can break it down successfully, it means you've found at least one practical use for the stuff in the tutorial.The other good place to learn PHP is at the PHP manual itself, but that's not oriented for "practical" use... I mean, there are very few, if any, "how to"s. It's oriented at exhausting the theoretical possibilities ("strings have this syntax, arrays have that syntax;you have functions A, B, C....; function A takes arguments x, y and z, function B takes;...").
  11. Just not GoDaddy. That's all I can really say.We have a separate topic with a list of hosts, usually (with the exception of those in my posts...) coming from people who have actually tried, and are happy with the services.
  12. At this point, it is worth mentioning that there are free hosts out there, which you can use for sites to which you don't expect heavy traffic. Combined with XAMPP at your own machine, they're also the perfect venue for learning what it takes (at minimum...) to run your own server.
  13. A monthly traffic a.k.a. bandwidth is the total amount of data the web server gives to all users over a month, regardless of whether they access the server together, or one by one... think of a glass (server) of water (traffic) with people drinking (consuming) from it with straws.How much bandwidth is "enough" depends on the amount of data you expect each user to consume per visit. For example, if you expect the average user to download up to 20kb HTML, 10kb CSS, 10kb JavaScript and 40kb images (i.e. a total of 80kb) on each visit, this means that with 12GB, you can serve up to 157286 visitors per month, or 5073 visitors per day.That last number shrinks quickly as the size of the average traffic per visit grows, but of course, the calculation here assumes a constant amount of data per visit. Different users consume a different amount of traffic, and each user consumes a different amount of traffic per visit, so that's always just an estimate. A lot of hosts do include that. Others require you to buy it separately (though most offer this "separate" service too).Most hosts give you the option of buying a domain from them (often with a discount from the normal price of that provider) OR use a domain you bought elsewhere.
  14. Symmetric? Guaranteed? Let me guess - no, and no.A server requires better upload speeds than download speeds, and most ISPs don't offer that. "10MBps" usually means "10MBps download/1MBps upload". Plus, the thing you see on offer is usually not the typical speed (the "guaranteed" one), but a theoretical maximum instead.Use a site like speedtest.net (check with both close and distant servers) to see your real speeds. You mean monthly traffic? Typically limited, even for paid hosts. But if your site is not under a heavy load, you're likely not to exhaust it. And if it is under a heavy load, you'll need to have a pretty decent hardware, and more than 10MBps upload to handle that load.
  15. You need to define your own simple type, and then set THAT type as the type of the element(s) you want it on - in this case, the "age" element.So for example: <xs:element name="person"><xs:complexType><xs:sequence> <xs:element name="age" type="childAge">...</xs:sequence></xs:complexType></xs:element><xs:simpleType name="childAge"> <xs:restriction base="xs:integer"> <xs:minInclusive value="3"/> <xs:maxInclusive value="10"/> </xs:restriction></xs:simpleType>
  16. The "once" in require/include applies for the current PHP execution. So, if you run example.com/index.php, from the start of this file to its finish, any include/require_once, as well as any include/require_once within the included files, will be included only once.And no, there's no way to only load part of a file or just one or a few functions of a file. The only way to only include some functions is to simply spread the function out into multiple files.
  17. It's somewhere around it, not this line itself. What are the first 20 lines of login.php?BTW, the arguments to setcookie() should probably look like: setcookie("id", $row['id'], $expire); but like I said, that line itself isn't causing the parse error, so the fix here is still going to give you a parse error.
  18. The so called "UNIX source" is actually the only source. Compilation instructions (for VC6, but I assume VC9 and VC10 would work in the same way) are available from the docs. IMHO, it's a lot trickier than the step-by-step PHP instructions.
  19. boen_robot

    Flash?

    If you really think that it would be easier for you to learn Flash, and the client asks for it... why would it not be a good idea?Most of us wouldn't really be able to assist you with Flash questions, but if the point is to get some income by something that you can do yourself, and that something is Flash, so be it - go for it.
  20. The note at the download page suggests it wouldn't be problem: But if in doubt, you could always recompile PHP with VC10.
  21. The Windows PHP page has a link on the left to ApacheLounge binaries that you can use. If for whatever reason you don't want to use them, or (as with PHP) you can to have a custom optimized build, you can build Apache too, from the sources on Apache's site.
  22. How do you implement it in Java and C++ (basically...)?
  23. If you can sacrifice IE6 and IE7, you can simply set the two divs to display:table-cell, set the body to display:table;, and remove the floats.
  24. AFAIK, Java has a canvas UI element.So... yeah, it would pretty much work out the same as if you were drawing everything on the canvas in Java. The only difference is that repaints happen as soon as you call a canvas function, which you can call at any event handler, unlike in Java, where (if I remember correctly) repaints happen at a particular event (that you could trigger from any other event), which is only the only event from which you can perform draws.
  25. What state are we talking about? The state within a page? The state across pages (including page refreshes) on the same device and browser? Or the state across devices, browsers, refreshes per user?The state within a page can be kept within a single JavaScript object, which is the closest you can get to a singleton. In JavaScript, an object is a little like the Map template of C++ or JAVA - you have key/value pairs, but the difference is that different values can be of different types, and one of these types can be a function... which is how you get stuff like "document.getElementById()". What is often called "the getElementById() function" for short is really the "getElementById" key in the "document" variable, which is an object, containing that key among others. And the value of this key is a function.The state across pages and page refreshes can be kept within cookies or DOM storage.To keep the state across devices, browsers and pages per user, you'll need to use a server side language in addition to JavaScript, and store the state in a database.
×
×
  • Create New...