PHP Errors.
I am new to PHP as some of you have already found out. I don't know any of the errors or the common fixes for them like I do with ASP. I am now getting an error that states..
Warning: Undefined variable: dircreate in D:\MainWeb\php\files\mkdir.php on line 18
I know what it's saying and I looked at the code and found the variable it's talking about. The variable is being used like this though...
// if form has been submitted
if($dircreate)
Is there a better way to check for that variable?
Does this mean the form shouldn't work?
Mark Hensler posted this at 23:14 — 23rd March 2001.
He has: 4,048 posts
Joined: Aug 2000
I have seen that error once myself... when I was configuring PHP for my cousins' NT box. I spent a while going through all the configs, and looking at my script (which worked on other servers), but couldn't find anything. Time was running out and I needed to leave soon, so as a last ditch effort, I coppied the php.ini file from my PC to his, and it fixed it.
So, it's some PHP settings on the server. But I still don't know exactly what it was.
What the error means, is that you've not given the variable a value yet, so you can't evaluate it. You could try:
if (isset($dircreate))
Mark Hensler
If there is no answer on Google, then there is no question.
trungson posted this at 05:59 — 24th March 2001.
They have: 9 posts
Joined: Feb 2000
It's just a warning and not a fatal error.
If you use error reporting level of 15, it'll give that.
artsapimp posted this at 06:05 — 24th March 2001.
They have: 330 posts
Joined: Apr 2000
How would I change the reporting level?
trungson posted this at 05:48 — 27th March 2001.
They have: 9 posts
Joined: Feb 2000
php.net/error_reporting
Mark Hensler posted this at 08:44 — 27th March 2001.
He has: 4,048 posts
Joined: Aug 2000
what level do you recommend?
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.