scootstah
Staff Alumni-
Posts
3,858 -
Joined
-
Last visited
-
Days Won
29
Everything posted by scootstah
-
Like I said you have provided us with nothing, so we are just shooting in the dark.
-
We can't answer that because you still haven't shown us what the errors are.
-
Try encapsulating the function body with: if (!filter_var($string, FILTER_VALIDATE_URL)) { // function body }
-
How to get files to be created by users and uploaded to a folder?
scootstah replied to APD1993's topic in PHP Coding Help
Why not? You already know what the file is called, and where it is stored. -
Set it to / instead of ../ EDIT: The cookie path, that is.
-
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(); }
-
How to get files to be created by users and uploaded to a folder?
scootstah replied to APD1993's topic in PHP Coding Help
Because like I said, you are only checking $filename. You should be checking the full path, IE: C:/xampp/htdocs/RCM3/$filename -
How to get files to be created by users and uploaded to a folder?
scootstah replied to APD1993's topic in PHP Coding Help
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? -
print variables to thank you page after mail()
scootstah replied to tbint's topic in PHP Coding Help
Since you are redirecting you need a way to store the variables between pages. You'll probably want to use sessions for this. -
Based on the first post I guess it would be: $system->output(new String("Hello World"));
-
How to get files to be created by users and uploaded to a folder?
scootstah replied to APD1993's topic in PHP Coding Help
Anywhere really. Here is good: <?php var_dump(is_writable("C:/xampp/htdocs/RCM3")); $filename=$_POST['filename']; -
Refer to this: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-format
-
How to get files to be created by users and uploaded to a folder?
scootstah replied to APD1993's topic in PHP Coding Help
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")); -
How to get files to be created by users and uploaded to a folder?
scootstah replied to APD1993's topic in PHP Coding Help
Use file_put_contents to create the file. -
The methods would have to return an instance of the class.
-
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.
-
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.
-
Go to the "Structure" tab of a table and then click "Relation View" underneath the column definitions.
-
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".
-
I have read the header error post but I am still having problems
scootstah replied to marquel2k69's topic in PHP Coding Help
Post line 40 of index.php -
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.
-
I think as long as the cookies must be there in order for the site to function, you are okay.
-
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.
-
I have read the header error post but I am still having problems
scootstah replied to marquel2k69's topic in PHP Coding Help
You don't stay logged in because you commented out the session. What is the error? -
You are way over-complicating the problem. function month($month, $day, $year) { echo date('F', mktime(0,0,0, $month, $day, $year)) . " $day, $year"; }