Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 16.06.2006, 20:01   #20
Bruenor
Архивный участник
 
Join Date: Jun 2006
Posts: 14
Default

All of the corrections that I posted were fixes to error messages that I got.


Quote:
Originally Posted by hel
"$dbname" not interpretted as variable. (only if I set it like " ".$dbname." ")
This confuses me. The dollar sign forces php to treat the word following it as a variable, so I don't understand how it's being interpreted as text for you.


Quote:
Originally Posted by hel
I don't understand, what you mean about moving include('config.php');.
I was just talking about things I tried doing so that only one "include ('config.php');" would have to appear in the file. The text within the parentheses there wasn't very important.


Quote:
Originally Posted by hel
You mean, I must set default values for variables?
That is correct. It's the reason for most of the corrections that I posted. I'm not sure if the php interpreter you use automatically initializes variables to 0 or "", but mine doesn't, and I'm sure it's the same for other people.


Quote:
Originally Posted by hel
For what? Is this a checking for empty results?
I was getting an error message each time php came across a $skill_book_id[$sid] that wasn't initialized. Checking to see if has been initialized prevents the error message. (Operators in php use short-circuit evaluation. If isset($skill_book_id[$sid]) is false, then $skill_book_id[$sid]==$sid never gets evaluated.)


Quote:
Originally Posted by hel
I think better is setting up 2001,-1. For infinite.
That doesn't work for me. The php interpreter I use does not treat -1 as infinite, so it gives an error message because the second number is smaller than the first.


Maybe the problem is just that I'm using an old version of php, but it's better to program things for the greatest compatibility. :wink:
Bruenor is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 17:44.