Jump to content

boen_robot

Members
  • Posts

    8,493
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by boen_robot

  1. If you currently work for a (semi-)popular web design/development company, your boss is a good pick.That, or a respected web design/development teacher. You can count any college or university teacher with a title above "assistant" to be such a figure by default. The older, the better (as the chances of employees knowing him increase).
  2. All questions regarding certificates should be sent to the source: .AFAIK, it's not "required", but without a supervisor, the certificate is pretty much useless.
  3. Yes, and you can also add/override any other header that PHP might send for one reason or another.
  4. What matters is how much data flows between client and server. So... the index is irrelevant for this. Just the data you send to the client (i.e. the data in all fields of a record, plus all bytes that are required for formatting it, which are quotes, commas and brackets in the case of JSON). Let's say that in the end, you still have 8KiB per entry on average... ... 8KiB * 1500 = 12 000 KiB ~ 11.72 MiB. Even at a high speed DSL connection (8Mbps = 1MiB/s), downloading the full set would take 12 seconds, which is unacceptable. If this site is an intranet site (the web server is within a local network with its clients; for most LAN cards, that's 100Mbps = 12.5MiB/s), downloading the full set will take, at worst, ~3 seconds (1 second or less, on average), which is sort of acceptable. And this is what "server pagination" essentially boils down to.
  5. I prefer Fiddler with IE, but any HTTP debugger will do - Firebug's NET tab, Opera's Dragonfly, etc.
  6. A data set is "large" when more often than not, the entries to be downloaded are so numerous that downloading them takes over 7 seconds, which is the point at which most users will just quit waiting for the page to load. Depending on the size of each entry, and the internet speed of the average user of your site, the threshold from small to large data set can be at anywhere between 5 and 5000 entries.Of course, you don't have to go over THAT edge. For many users, 1 full second is already so slow that they'd look for competing sites (they'd still forgive you if your data is worth it of course).
  7. XML by itself has no semantics. You need a tool that would interpret your XML in whatever fashion you want, and deal with the database accordingly.You don't have to use a specific tool by someone else... you could write a tool yourself, that would interpret your XML in the way you want it to.
  8. Using the function affects how real_escape_string() will interpret characters (and thus, whether it would escape them properly), while "SET NAMES" doesn't. If you use "SET NAMES", a specifically crafted input to your query could result in an SQL injection. It's hard to come up with a specific example, as it's not as trivial to trigger as a plain ' in the middle.The meta charset affects the display of your web page if viewed offline. When users view it online, the HTTP headers are used instead, but when offline, if you don't have a charset meta, the browser will fallback to its default, which is more than likely not what you're after.
  9. "We"? "Your XML language should..."? Is that a school assignment by any chance?Probably what they want you to do is use some language (whatever language is allowed: PHP, ASP.NET, etc.) to "screen scrap" this web page, and turn it into an XML document that contains said data. Read up on "DOM", and more specifically, the DOM as it appears in your language of choice.
  10. The template engine is the component that takes data from the application logic and combines it with a presentation template ("template" being basically, HTML with "slots" for the data to go into) to produce the final HTML. If you truly have separation between those two, then you should be able to use the application logic with different presentation templates, in which case you already have a template engine. It's just that it's a custom engine, not a separate one.
  11. Abstract away the common stuff... which I assume would include the vast majority of PHP code... and use two HTML templates - one for desktop, and another for mobile.This is assuming that you're currently using a template engine rather than just "blindly" mixing your PHP and HTML. If you aren't yet using a template engine, you have some work ahead of you to separate your common code from your device-specific code.BTW, it's important to note - you should let users override your detection. Just sayin'.
  12. What are you actually trying to do? It's not at all clear from your description... can you give some example stuff you want to end up with?
  13. The W3Schools admins don't have the power to fix the search feature. This is a problem with Invision's software/servers, both of which are under Invisionzone's sole control. There used to be more information on the site, including emails, but I'm guessing they got overwhelmed with emails asking for assistance (that in spite of the existence of this forum).There's still this email if you want to contact the owners: It's not an admin setting, I can tell you that.
  14. You can find out the username PHP runs as using get_current_user().If PHP runs as an Apache module, it will run with the same privileges Apache has. You can adjust that username by going to "Control Panel > Administrative Tools > Services", double click the Apache service, and then in the "Log on" tab, type the username and password for the account you wish Apache (=> PHP) to run as - one that you know has enough permissions (e.g. Administrator). Restart the Apache service for these settings to take effect, and the script should now have enough permissions.
  15. AFAIK, the ability to take ownership is a separate privilege that may be disabled.You need to make PHP run as the user that has enough permissions. This is a server setting, so there's nothing you can do from PHP to circumvent it - if you find a way with just PHP code tweaks, you've found an OS vulnerability.
  16. AFAIK, you should be able to, yes. But if it's going to be a link, you may find it more convenient to apply the styling on the link, rather then the image. If you let the CSS validator emit warnings, you'll see some interesting tips. Don't try to eliminate all warnings, as some are due to the validator being stricter then what W3C intended (I'm referring to the "background:transparent;" warning in particular).The first two talk about using a generic font family as the last alternative, i.e. instead of just "font-family : arial;", make that "font-family : arial, sans-serif;".A lot of the other warnings can be eliminated by simply moving all common parts of a:link, a:active, a:hover, and a:visited into just "a", i.e. instead of#nav a:link { text-decoration:none; font-weight:bold; color:#ffffff; font-size:16px;}#nav a:active { text-decoration:none; font-weight:bold; color:#ffffff; font-size:16px;}#nav a:visited { text-decoration:none; font-weight:bold; color:#ffffff; font-size:16px;}#nav a:hover { text-decoration:underline; font-weight:bold; color:#ffffff; font-size:16px;} make that #nav a { text-decoration:none; font-weight:bold; color:#ffffff; font-size:16px;}#nav a:hover { text-decoration:underline;}
  17. How did you generate those .frm and .myi files? Whatever utility you used, THAT should probably contain means to also restore from those files.
  18. << Topic moved to Critiques >>I can't judge the appearance much, as I'm not much of a designer, but as a layman - it looks nice.On the code, it's good in general. I have several minor comments:1. The logo could be made into an IMG element. Better yet, an IMG in a link to the home page. It has become a sort of convention for users.2. You already have <div id="nav">, so you don't need the class at every "a" element. Remove them, and replace any a.nav with #nav a 3. Remove the two <style media="all" type="text/css">@import "style.css";</style> and replace them with a single link, like: <link rel="stylesheet" type="text/css" href="style.css" /> 4. Try to turn the links into an actual unordered list (and by that, I mean using "ul" and "li" elements), and style that so that it's horizontal, as currently. More importantly, remove the "|" separators. You can replace them with borders or outlines on the "li"s.
  19. boen_robot

    Web development

    << Topic moved to the PHP forum >>
  20. There is DatePeriod exactly for this purpose. You should adjust the start of the month to start off the week properly though. So something like: $now = new DateTime($newdate);//the code below depicts last and first day of month$fstdmonth=clone $now;$lstdmonth=clone $now;$fstdmonth->modify('first day of this month');$lstdmonth->modify('last day of this month');if (1 < $fstdmonth->format('w')) { $fstdmonth->modify('Monday this week');} elseif (0 == $fstdmonth->format('w')) { $fstdmonth->modify('Monday previous week');}echo '<div>', $fstdmonth->format('r'), '</div><div>',$lstdmonth->format('r'),'</div>';//Just for testing purposes?><table id="month"><thead><tr><th>M</th><th>T</th><th>W</th><th>T</th><th>F</th><th>S</th><th>S</th></tr></thead><tbody><?php$daily = new DateInterval('P1D');foreach (new DatePeriod($fstdmonth, new DateInterval('P1W'), $lstdmonth) as $weekStart) { echo '<tr>'; foreach (new DatePeriod($weekStart, $daily, 6) as $weekday) { echo '<td'; if ($weekday->format('n') !== $lstdmonth->format('n')) { echo ' class="extraDay"'; } echo '>', $weekday->format('j'), '</td>'; } echo '</tr>';}?></tbody></table> where the "extraDay" class is added to let you style dates from other months differently. With a small adjustment, you could instead create empty cells, but IMHO, having the numbers there is somewhat helpful for the user experience, as long as you use the class to style the other months' days differently.
  21. boen_robot

    what debugger

    Right, but still. Maybe there was a time without them, I don't know. Every version I've ever downloaded (a VC6 TS binary that is) has had "php5apache*.dll" files in it that were compatible with Apache binaries. Maybe if you've downloaded NTS binaries? Those are meant for IIS, so they don't include Apache DLLs. Or VC9 binaries?
  22. Maybe. But I don't remember "this" ever being an optional part of the relative time syntax, so this is probably more of a bug fix.
  23. boen_robot

    what debugger

    Well, strictly speaking, PHP does include a web server since PHP 5.4.0, plus it has always included connectors for Apache 1, Apache 2.0, and Apache 2.2.I'm guessing the reason they don't include it is that previously, the connectors were for official Apache binaries. But there aren't official Apache 2.4 binaries, and they can't include binaries for every possible Apache compilation. So ApacheLounge ends up distributing its own connectors for its own Apache compilation.
  24. Ah. I see. Well, I tried the code, and I think I found it. I missed the part: Failed to parse time string (first day of month) at position 13 (m) What this message says is that the "m" (as in "month") is where interpretation collapsed. The message about the timezone suggests the word "month" was treated as a timezone for some reason.Using "this" clears this out, so: $now = new DateTime($newdate);//the code below depicts last and first day of month$fstdmonth=clone $now;$lstdmonth=clone $now;$fstdmonth->modify('first day of this month');$lstdmonth->modify('last day of this month');
×
×
  • Create New...