Jump to content

trq

Staff Alumni
  • Posts

    30,999
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by trq

  1. Sorry but that code is unreadable. Can you indent it consistantly?
  2. Then, you need to show us the code that produces this output. eg; What code have you got where // Blah Blah is?
  3. Just pass $title_path in as a second arguument to the function.
  4. This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=309827.0
  5. This topic has been moved to MySQL Help. http://www.phpfreaks.com/forums/index.php?topic=309828.0
  6. Assuming your date field is named 'stamp' and the id your after is 4. SELECT fld FROM tbl WHERE id = 4 ORDER BY stamp DESC LIMIT 1
  7. Yes you can, just not one that has been included via a url.
  8. There is no such function built in. But, in the manual, right where you read about it, it is defined. Its a user function.
  9. There is always a way. You would however need to write these functions yourself. I'm not sure what the difference between is_recursive() & is_multidimensional() would be though, they sound like there pretty much describing the same thing.
  10. I'm not sure that is what the OP actually meant as including a file from a remote server doesn't allow you to execute functions within that file, it just includes the output (if any) of that file into the position where include was called. it doesn't import functions, variables or constants into the same scope.
  11. require(), require_once() include() include_once() are not functions, but language constructs (statements). As such, they DO NOT require braces either. eg; include 'somfile.php';
  12. This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=309813.0
  13. If you want to make sure your function executes successfully you need to at least check what it is doing. function save_ini_file($filename,$content) { $File = "ini_files/". $filename . ".ini"; if ($Handle = fopen($File, 'w')) { $info = $content; if (fwrite($Handle, $info)) { return true; } fclose($Handle); } return false; } Because there are several things that may go wrong within this function, you might also want to take look at having it throw exceptions.
  14. __set() is just a shortcut method, it doesn't have to be used (and in this case it is not), in fact allot of people will avoid these shortcuts as they can make code that little bit harder to read.
  15. This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=309756.0
  16. What exactly is the problem?
  17. This topic has been moved to Ajax Help. http://www.phpfreaks.com/forums/index.php?topic=309753.0
  18. This topic has been moved to Installation in Windows. http://www.phpfreaks.com/forums/index.php?topic=309740.0
  19. This topic has been moved to Other Libraries and Frameworks. http://www.phpfreaks.com/forums/index.php?topic=309715.0
  20. This topic has been moved to Editor Help (Dreamweaver, Zend, etc). http://www.phpfreaks.com/forums/index.php?topic=309658.0
  21. trq

    Idiots.

    Currently I am on a two week vacation from work. Before I left, I spent three days digging through procedure documentation and putting it into an easy to use document outlining how to update different aspects of each of our main websites. I then handed this documentation to my boss and let her know that if there was any urgent updates to be made while I was away she would need to follow these very simple instructions. Today (one week into my holidays) I receive an email. "We have updated the 'NewMedia' website, we didn't follow your instructions, it is broken, can you vpn in and take a look?" They have got to be kidding!!!
  22. This line attempts to send an email using the $smtp object..... $mail = $smtp->send($email_to, $email_subject, $email_content); These lines create the $smtp object. $smtp = Mail::factory("smtp", array( "host" => $server, "username" => $username, "password" => $password, "auth" => true, "port" => $port ) ); The problem is, in your code, the line that uses the $smtp object comes before the lines that actually create this object. Meaning the object doesn't even exist when you attempt to use it. So, the first line needs to go after the second series of lines.
×
×
  • 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.