Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. No. empty only excepts one argument.
  2. include_path has nothing to do with what extensions are loaded.
  3. Is this a joke? None of them can hold a note.
  4. You really need to look into loops and arrays. There's no way I'm going through all that code though.
  5. Where exactly are you lost? Were not here to write scripts for people.
  6. Says who? Of course there are also plenty of tools around for reading server logs (I think Awestats actually reads server logs) though, awk, sed & grep come to mind.
  7. As I said, you need to remove the front slash.
  8. Well, using php you could create a regex that searches for string that look like emails or phone numbers and then obfuscate them.
  9. You just described for yourself how it might work.
  10. That completely depends on your ability, but it should be pretty straight forward.
  11. Would be pretty useless doing this in Javascript as its client-side and could be easily worked around.
  12. That is exactly what your current setup should do.
  13. Yahoo likely provides an api of some sort for this, I'd start there.
  14. What exactly is your actual problem now?
  15. Shared server will often have this disabled. You may be out of luck.
  16. ODBC is used to connect to databases, you would need a soap client or custom parser to connect to a web service.
  17. Where exactly are you stuck?
  18. Its not rocket science. The variables you put in the database need to remain intact. eg; Don't override $fileName with your random string.
  19. Given your examples: cplfunctions.php if ($num >=1) { $status = '0'; } else { $status = '1'; } ecuo $status; And the jQuery. $.post( "cplfunctions.php?action=checkUsername", { username: username }, function(d) { console.log(d); } ); See http://api.jquery.com/jQuery.post/ for more details.
  20. If the common directory is within your document root you need to remove the slash on the front of it. As for books or articles, I'm really not sure. The way I described above is pretty much how most of the big frameworks do it.
  21. Have you configured Apache to use the manually installed version? I'm still not really sure this is a wise thing to do.
  22. Yes. But I could easily make a random name generator. Its applying it to the name of the file that is uploaded. Then, on this line..... $filePath = $uploadDir . $fileName; Replace $fileName with your randomly generated file name.
  23. Wow Dude! I'm suffering with information overload "lol" There is a lot of info in there, isn't there! My head is spinning man. Yeah, there probably is allot in there, but its programming, its not a simple task. Learning the right way the first time will prove much more beneficial than learning things the wrong way. Its always good to get a firm grip with the basics first, from there, its just logical thinking.
  24. I work with allot of oop code and I have my own framework of sorts (we'll call it foo), so things may be a little different, but you should be able to apply similar practices. If this is the structure your hosting has given you (again, I use my own servers so this is just a guess at an example.... [pre] /home/yourusername /htdocs [/pre] I would make my own libs directory and place it on the include path. [pre] /home/yourusername /htdocs /libs [/pre] I would then place my framework within libs.... [pre] /home/yourusername /htdocs /libs /Foo /Config /Controller [/pre] Then, within my php scripts I can easily include the classes I won't by simply using.... <?php include 'Foo/Controller/Front.php'; ?> This (pseudo) namespaces all my own libs into the Foo directory and is exactly how Pear works. Of course this ends up getting taken further by using an autoloader so I don't really have to include anything at all. Given the above structure, using the Pear/Zend naming convention and using this simple autoloader.... function __autoload($class) { require_once str_replace('_', '/', $class) . '.php'; } I can now just instantiate classes without even needing to include them. eg; $fc = new Foo_Controller_Front; This might be getting a bit too far ahead of your needs but I'm just giving you an example of what can be done.
×
×
  • 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.