Jump to content

vineld

Members
  • Posts

    286
  • Joined

  • Last visited

    Never

Everything posted by vineld

  1. I actually think we're all right, it depends on how you measure the speed and what functionality you test. However, it does take more effort to make .NET (whether it be C#, VB or JScript) perform as efficiently as PHP under heavy load.
  2. Well, several leading websites don't use OOP at all so that argument doesn't quite hold up. Not that many are prepared to pay in order to have their current systems re-coded when there is really no need for it.
  3. Yeah, I know I suck compared to many but I try to improve all the time :-\ Would it be better to pass the string?
  4. It is possible to disallow url access for include / require even if allow_url_fopen is on.
  5. Totally depends on where you are I'd say the demand for PHP and .NET is about the same in the Netherlands. On what facts do you base that just curious. Yeah, it does probably vary depending on where you live but I assume that .NET developers are much fewer overall? The heavy traffic thing might not be entirely true although .NET sites do in general tend to load slower even if there are exceptions. Most high traffic sites here in Sweden are PHP based. It is easier to implement lighthttpd, Sphinx and other high performance tools. You can read some interesting notes here: http://misfitgeek.com/blog/aspnet/php-versus-asp-net-ndash-windows-versus-linux-ndash-who-rsquo-s-the-fastest/
  6. How do you usually store unknown dates and times? Do you use a flag field or do you set them to null? What is the preferred way to go?
  7. Recently I wanted to use simplexml_load_file in order to retrieve xml data from an external source at one of my web accounts. However, the hosting company in question does not allow external file access via simplexml_load_file or file_get_contents for security reasons but they do on the other hand allow it via cURL which worked just fine. What is the difference really when it comes to security?
  8. Copyright doesn't run out just like that no matter what the text says, does it?
  9. I think you're asking this question in the wrong forum although I expected a much more fierce discussion If you don't have much programming experience at all then PHP will be easier to learn for most people although you will still need some time before you have learnt enough to produce good code. If you are looking for a professional career then I would advice you to focus on .NET first since there is usually a greater demand and therefore generally pays better. That is if you have to choose one over the other. There more you know the more attractive you will be as long as you somewhat in-depth knowledge. As mentioned already many companies use .NET since it is nonetheless a very powerful language (especially compared to old classic ASP which is still used in some older company systems) that goes well with a lot of company software products. I personally tend to use .NET mostly in my professional work and PHP for personal use. I would say that .NET is not as well suited for (exceptionally) heavy traffic as PHP is but for most websites that is not an issue. The language doesn't matter that much to a good programmer though. Many "real" programmers (Java, C++, Pascal etc.) I know have a decent grasp of web scripting as well. I wouldn't say you have less control in ASP.NET though, it's just that it seems that way in the beginning since it is more structured and fixed in its nature than for example PHP. Once you learn the techniques there is virtually nothing that can't be done in .NET as well. Also, .NET is not really just one language, it's a framework where you can use C#, VB and JScript to mention the most common languages. I prefer C# myself but that's more of a personal preference.
  10. Ok, thanks, I guess I'll wait a while then before trying v.3 out until it has become more complete. I noticed that it should load faster which is of course most welcome.
  11. Well, I hope so, that we could all do without
  12. I have read in several places on the internet that the global variable command, such as this: function myFunction($var) { global $external; } will be removed as of PHP 6. Is this actually true? I've used this in quite a few places in order to access language specific string arrays instead of passing the value to the function. Is this bad practice?
  13. I wasn't really sure where to post this but I guess this was the only fitting forum. I have been using v.2 of the Google Maps API for some time now and have not abandoned it despite noticing that v. 3 is now in use. Am I missing out on something or could I just as well continue using v. 2?
  14. Most of the time I use separate tables as well, especially when there is some information that is specific to one of the structures. However, it is possible to implement the parent-child model with just one table.
  15. How do you usually solve the question of organizing geographical and political structures in a database? For example states, counties, cities etc. In many cases people put everything in one single table, using the parent-child model, and in other cases they are stored in separate tables. I have used both alternatives myself depending on the situation given but I would like to hear what you all have to say on pros and cons of the two solutions.
  16. There isn't really any more code of relevance to show. It's a simple ajax request. Yeah, I am usually using sessions but I wanted to experiment with this alternative in case there is a situation where it would be needed (can't really think of one now though...). It seems as if the $_GET is getting in the way so to speak. I have tried removing the urldecode as well although it makes no difference. I suspect it has to do with the character encoding though. Using sessions it works just fine.
  17. I have run into problems using serialize / unserialize together with urlencode. In the first file I do this: $a = urlencode(serialize($aArray)); echo count(unserialize(urldecode($a))); This results in the correct number of items in the array. I then send $a to another file where this is done: $a = $_GET["a"]; $a = urldecode($a); echo $a; $aArray = unserialize($a); echo count($aArray); This simply prints 1 and the array has not been restored. What is the problem here? I have simplified the code somewhat, I actually return js for an ajax request in the second file. I have alerted the $a string in the second file, copied it and ran unserialize in another simple php file and then it works...
  18. I am unable to change file and directory permissions at my host using an FTP client (it still says 'command successful') although when I try the same using a script it works fine. Why is this?
  19. Unless this is an extraordinary situation I really think you should refrain from using tables for layout purposes though.
  20. print_r is simply a quick way (usually for testing and debugging purposes) to print the content of an array. If you want to display the content in any normal fashion you will have to loop through the array.
  21. You missed the 'c' in function.
  22. That's why he used ceil for rounding.
  23. I think I may have found the problem. My host saves the sessions in the shared tmp folder and run scripts regularly which clean up this folder.
  24. Thanks! Failed to find that thread although there was a lot of air in it and it doesn't quite answer all of my questions. Your multi-recipient argument was a good one though. Had not thought of that. However, I usually don't allow that since it gives spammers a neat tool (that can be solved in various ways though) and there are very few situations where you would want to send a PM to several I'd say. It doesn't hurt to have a flexible system though.
×
×
  • 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.