Jump to content

scootstah

Staff Alumni
  • Posts

    3,858
  • Joined

  • Last visited

  • Days Won

    29

Everything posted by scootstah

  1. Like I said you have provided us with nothing, so we are just shooting in the dark.
  2. We can't answer that because you still haven't shown us what the errors are.
  3. Try encapsulating the function body with: if (!filter_var($string, FILTER_VALIDATE_URL)) { // function body }
  4. Why not? You already know what the file is called, and where it is stored.
  5. Set it to / instead of ../ EDIT: The cookie path, that is.
  6. You can't put random code inside a class definition; only methods and class variables are acceptable. Also, that's not really how you use Exceptions. You shouldn't be handling the Exception in the same place you throw it, that defeats the purpose. It should be more like: class Example { function __construct($input) { if (in_array($this->_input_word, Library::$_translators )) { $this->_input_word = $input; $this->_check = true; } else { throw new Exception("Word not found in library."); } } } try { $example = new Example; } catch(Exception $e) { echo $e->getMessage(); }
  7. Because like I said, you are only checking $filename. You should be checking the full path, IE: C:/xampp/htdocs/RCM3/$filename
  8. I think the issue is that you are not checking that the file exists in the same path as the one you are saving it to. You are checking to see if $filename exists in the same directory that the script is run. Have you checked if the files are actually created or not by viewing the directory?
  9. Since you are redirecting you need a way to store the variables between pages. You'll probably want to use sessions for this.
  10. Based on the first post I guess it would be: $system->output(new String("Hello World"));
  11. Anywhere really. Here is good: <?php var_dump(is_writable("C:/xampp/htdocs/RCM3")); $filename=$_POST['filename'];
  12. Refer to this: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format
  13. Oops, I didn't even see the part of the code with the fputs. Do you get any errors? Do you have write permissions? What does this give you? var_dump(is_writable("C:/xampp/htdocs/RCM3"));
  14. Use file_put_contents to create the file.
  15. The methods would have to return an instance of the class.
  16. Not necessarily. An abstract class simply defines the "structure" of the class for child classes that extend it. You can use static methods, private methods, public methods - it doesn't matter.
  17. Public static means that the visibility is "public", meaning you can access the object outside of the class itself, and the object is "static", which means you can access the object without having to instantiate the class. Since the class uses all static objects, there is no reason to instantiate it - setting the constructor to private means that it cannot be instantiated and will throw an error if you try. :: is the Scope Resolution Operator. It is essentially the equivalent to the -> operator for static objects.
  18. Go to the "Structure" tab of a table and then click "Relation View" underneath the column definitions.
  19. I use the Ghostery addon for Firefox to block a ton of tracking cookies. I can't really come up with a good argument as to why I use it. I saw it while browsing for neat addons and thought "hey, why not".
  20. If they spend a small amount of time cleaning up the laughable inconsistencies in the core I would be happy. Other than that, the majority of the "wish list" items I have seen don't really affect me either way.
  21. I think as long as the cookies must be there in order for the site to function, you are okay.
  22. I would say the first URL, since the incoming part is irrelevant. Since the message ID is unique you don't have to specify whether it is incoming or not, you could display that information elsewhere on the page.
  23. You don't stay logged in because you commented out the session. What is the error?
  24. You are way over-complicating the problem. function month($month, $day, $year) { echo date('F', mktime(0,0,0, $month, $day, $year)) . " $day, $year"; }
×
×
  • 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.