Jump to content

Nameless12

Members
  • Posts

    244
  • Joined

  • Last visited

    Never

Everything posted by Nameless12

  1. I always thought people who wrote the majority of php tutorials were noobs for a lot of reasons, but i really had no idea how stupid they could be. I was writing my own bbcode parser, and why looking for lists of bbcode params etc for my parser I came across some code http://elouai.com/bb2html.php.txt this code reminded me of many tutorials I saw a long long time ago before i learned anything about security. People who are writing tutorials etc should know better then to release code like this, millions of webpages will of copied the above technique... BBCode was invented as a security measure, code like the above is not secure and if you are going to code like that it is as insecure as html. I find it very odd that the phrase BBCode Injection is rarely heard of, I imagine this is probably one of the most common security flaws on the web.
  2. Oh dear.. no wonder you can't see the difference :\ You have miss read the intent of my words, when i said that I did not mean that I don't see the difference. I know oop quite well, I just don't think it is drastically different from procedural IN TERMS OF APPLICATION FLOW, I don't think anyone could ever say they are the same due to the fact oop has a lot of features that procedural lacks. However that said I still don't think it changes the flow of an application any more than how HOOKS change the flow of an application. Also classes are just a bunch of related data, just look at the php4 OO model and it is clear that is right. I see OOP as more then this, but I just thought it was a better way to put it in context to someone who is just starting out.
  3. A petition against global warming. http://en.wikipedia.org/wiki/Oregon_Petition I have no interest in convincing you of anything, but this should be enough to show there is another point of view. I don't doubt climate change at all, but to say its because of global warming is wrong in my opinion. Humans are involved, humans who would otherwise be out of a job. The reason so many people believe various things like this has little to do with science and everything to do with what they hear on tv. I am not saying that what is on tv may or may not be true, but that is what people use to form their opinion and I just find that to be rather stupid.
  4. climate change is real, but global warming is myth.
  5. Exactly One new unit for each race and new features plus a new game engine and unit tweaking plus the new units you mentioned. Doesnt this sound like an addon?? And I dont mean this in a negative way when i say it is a remake, I am soooo happy it will look and feel like a remake because I loved the original so much.
  6. not allowing spaces in the names would help make it easier to filter with regex
  7. you should have a whole table of admins storing the users id and their administration level, the users have no way of changing their user_id so its pretty much impossible for them to pretend to be an admin. If you are just worred about people going around with a username of ADMIN, just filter out names you dont allow in registration page.
  8. If it is easy then all the more reason to sit the exam.
  9. I hope its as good as the original. It must be around 10 years since starcraft was released and people still play it online. I am glad they are not changing starcraft, it looks more like a remake of the original. I think for this reason alone it will not be out as late as liquid fire thinks.
  10. [quote] because I have almost mastered javascripts since I Started on it, on monday [/quote] Most people tend to underestimate javascript, there is quite a lot more to it then people realize. [quote] I just want to get some information, I am learning javascript.  I want to know of ways I can utilize javascript. [/quote] Here some of my recent bookmarks, they are using canvas to draw the 2d\3d, I bet you didnt think javascript could do much of the stuff in the following list. Dont be so quick to say you have mastered something, there is almost always much much more depth than you first anticipate (regardless of what language you are using). http://www.croczilla.com/svg/samples/svgtetris/svgtetris.svg http://canvex.lazyilluminati.com/83/play.xhtml http://henrikfalck.com/unrealsoccer/ http://andrewwooldridge.com/canvas/canvasgame001/canvasgame002.html http://www.abrahamjoffe.com.au/ben/canvascape/ http://www.abrahamjoffe.com.au/ben/canvascape/textures.htm http://arapehlivanian.com/wp-content/uploads/2007/02/canvas.html http://developer.mozilla.org/en/docs/A_Basic_RayCaster http://www.blobsallad.se/
  11. What I said was wrong and innacurate but the reason I said that was when you compare functions with classes, I really dont see much of a difference in terms of the flow of the application, I dont see the difference because functions can use other functions inside a function and it uses different parts of the program, when most phpers talk about procedural I get the impression they are talking about Top to bottom apps if you understand what I mean. I shouldn't of said what I said, I just hate the term procedural because anyone who programs top to bottom like I think many phpers do is a beginner or an idiot. And the reason I think most phpers do this is because php is so popular and thats the way the majority of tutorials teach People talk about how oop is so modular as if somehow functions are not modular enough. Functions are heaps modular, but the majority of people programming in php dont seem to understand how to use them properly because they are optional unlike many other languages. I am ranting, anyway you are right what I said was wrong but it was to try and describe this rant in a shot way.
  12. The same way you learn anything else, persistence and try to be a perfectionist as much as possible.
  13. No, its not personal preference.. Any OOP Programmer who discards functional programming because he has "Chosen to use oop" is an idiot. They should be used together, people should not pick one over the other. class: A grouping of related functions that share the same properties. OOP can just do lot of neat things it can do that cannot be done without them, figure out what they are because there is to much for me to list in this post. (there is that much)
  14. Try not to use golden rules, you could as easily use functions as opposed to classes. //here is my own little summary for you Controller: Should route to a specific area where you can `control` things Model: classes\functions\generic things, there should never be output here unless you are debugging View: the template file where the Controllers data is passed and displayed
  15. Models should not be creating instances unless its object composition, the controller is called the controller because it controls everything.
  16. The trick is to not get caught up with peoples implementation. Controllers are not something that make a site mvc, controllers are just one of the components. And controllers do not need to be an object. The controller is called the controller because it controllers everything, the view is the GUI that uses data gathered from the model. It is really quite easy to understand the parts that may confuse you is all the routing\bloated controllers that you are seeing in all the frameworks. There is a simple solution to this, learn oop fist!
  17. Java (JSP) requires Apache Tomcat. and Java when used for the web is JSP, not "Java" Any language compiled to binary can execute the binary file in Apaches CGI-BIN Any script with the shabang can be run from the CGI-BIN also. And yes there are some Apache mods out there as you have just found out There is an open source project called mono to get the .Net stuff running on different operating systems. I have never used it so I dont know much about it or if it would work with Apache or not.
  18. as echoed out command in php?? You dont do that, it goes prior to the php tags. #! is for the operating system not for php. There is a simple solution to your problem, use php5 instead of 3 and 4. You have to specify one way or another, in windows you would do it with a file extensions but linux is different. I actually think #! is a better solution to the problem then file extensions. If you dont want to use #! I suggest you learn C You posted as I was typing this so parts of my message will be irrelivent but that was the whole point of #!/path/to/file, each tile you execute a script it checks for #! if it s there it tries executing the current file with the path provided after #!
  19. 1. yes I think you are confused because you are coming from windows, unix does not use file extensions the same way windows does. What you think is a directory is an executable *.exe There are only two correct ways to do it php FILENAME or #!/path/to/php however there is a little trick but i dont think it would work properly on your server due to the multiple php versions. #!/usr/bin/env php <?php echo 'hello world!'; ?> #!/usr/bin/env python works for python as well and why I have not tested it with perl as I dont use that, I would bet my life that also works.
  20. I dont see an error, I see two headers followed by an empty line and a line of text. For all I know this is what your script is meant to display. Although I dont quite know why your version of php is showing the headers it shouldn't. But look at the number in the headers X-Powered-By: PHP/5.2.1 <-- 5.2.1 It should work without -f as well.
  21. Like I said I am not trying to covert anyone I am not preaching, I was just saying I thought it was worth being aware of it before committing to something, nothing more. Your argument about php was designed for the web is flawed because all the functionality that php brings to the table is nothing more than a framework that can be written for any other programming language. This is why web development in most other languages comes in the form of a framework. And yes you are right, I got the wrong impression maybe from reading the topic from the bottom up. I read it as if you were going to pick a new language to learn, and thats why I said what I said. About what you said about languages "being more powerful", that is very relative and you could say it about all programming languages that in common use.
  22. chmod +x phptest should of been chmod +x php5test so i hope you did not copy and paste. +x makes it executable, in linu x >> ./ << will execute a file, example ./filename. The file has to be executable before it can be executed though. The #! shebang is a unix thing, you can use it in perl, python and other languages. #!PATH/GOES/HERE/TO/AN/EXE #!/usr/bin/python #!/usr/bin/php #!/usr/bin/perl or you can just do php filename.php, if you do this the file wont need to be executable but its best practice to do it with #!/usr/bin/php #! has to be the first thing in a file. I have not tested it with spaces before it as that would be stupid but I am 100% sure it has to be at the very start of the file (no spaces or new lines) When you type "php" in the command prompt it opens /usr/bin/php if you want to use it with the php5 exe you need to be specific /usr/local/bin/php5/ <-- remember this is the correct path you should be using
  23. //save as php5test #!/usr/local/bin/php5 <?php echo 'php5'; ?> //make it executable chmod +x phptest //execute it ./php5test
  24. I said what I said because If I went back in time and knew about python I would of chosen that over php, the advantages are you can create more than webpages and you can also create webpages very well. Python is a better designed language than php (not to dis php, it just happens to be true) If you do something like python you can do 3d\apps\webpages, you are not just limited to webpages. And why on a technical level php CAN DO 3d and CAN DO GTK apps. Just because you CAN do it does not mean you should do it. Also, I think python is a better language then ruby so if I don't defend ruby, its because I have chosen php with a bit of python on the side (not ruby). I just thought it was worth checking out before you committed your self to learning php for obvious reasons. I was not saying ruby\python are better choices, just that they are worth a look (especially python) before committing as committing to learning a new language as learning a new language is a big undertaking.
×
×
  • 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.