Jump to content

cpd

Members
  • Posts

    883
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by cpd

  1. PHP is a server-side language not a client-side language, so no its not possible to carry out the cycling of images through PHP.
  2. What have you done to debug it yourself? It would be helpful if you described what its meant to do as well. Saying "its broken", "please fix it" is hopeful at best.
  3. Arguably the wrong way; at least for this day in age.
  4. Once PHP has processed your script server-side the web server sends the content to the client. Once that's happened you can't edit the content of the page with just PHP without sending another request. You'll need to use Javascript to cycle through the images.
  5. You can create events in MySQL, see http://dev.mysql.com/doc/refman/5.1/en/create-event.html
  6. You can import CSV files using phpmyadmin if you've got it installed on your server.
  7. cpd

    url regex

    Read the manual. I wouldn't really call them conditions and if you're looking for those 4 only why not create an array containing all 4 and test if your $variable is in that array.
  8. Hi, welcome to the forums. Firstly I'm curious as to why your not using a database management system (DBMS)? This question dramatically influences what code you write.
  9. What debugging steps have you taken so far because I see many places something could go wrong... You also have very inconsistent code switching between the procedural MySQLi functions and the object-oriented methods; choose one and stick to it.
  10. I can't see anywhere you're trying to retrieve information from your database.
  11. What error? You're now getting a message that gives you the host information...
  12. You realise that message is going to be displayed EVERY time you call connect()...
  13. That's a really good presentation Christian, cheers.
  14. Including via http doesn't work the same as a local include. The script your requesting through http will still be executed on the server it resides and any output included in your script. I.e. if someone includes your script you would have to print your class out for them to use it and even then it wouldn't work because you have dependencies they can't get their hands on for the same reason.
  15. Look at your connect() function and tell me where you've defined $link... Then take a look at http://php.net/mysqli_get_host_info/ and see what the parameter type it expects. Your select function also returns nothing.
  16. Sorry, that was my fault. I should have spotted that!
  17. I found this quite a while ago and it was very useful to grasp a basic understanding using an example. Assuming your competent in PHP you can extend it further.
  18. XML is used in SOAP which is one of the common web service interaction protocols and WSDL is used to describe the web service - also uses XML. Are you building a PHP Web service and client or writing it in another language?
  19. , is it really that hard? The code in the OP is completely useless as we've no idea how you've used $list and we can't see your HTML which could be the problem. Echoing "There was a problem" before the body tags is really bad control flow as well. Re-think how you display errors.
  20. Take a look at Bootstrap css. Its really nice.
  21. I have no idea what the hell that post is meant to mean...
  22. If your working with classes and objects I recommend taking a look at autoloading. Its the most efficient way of having your classes instantiated on an ad-hoc basis. If a client is accessing images your root (WEB_ROOT) is effectively your domain (http://mywebsite.com/) and you can think of it as your public_html directory. So if you have an images folder in your public_html your absolute path would be "/images/myImage.jpg". If the server is accessing an image you should use the directory root (DIR_ROOT) which is /home/username/public_html/images etc. Bare in mind both constants are defined by you; they aren't a PHP thing. I've calle dthem WEB/DIR_ROOT but you can call them whatever.
  23. Are you using CodeIgniter? That code has one to many brackets. The bracket after $table->id isn't needed.
  24. Say whaattt... I think your confusing what many people refer to as WEB_ROOT and DIR_ROOT. The directory root, which should be used with requires/includes, is commonly /home/some_user/public_html/yourFilesHere. So $config['app_dir'] should really be a full directory including home etc to your application. It looks like you've confused WEB_ROOT with DIR_ROOT?
×
×
  • 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.