|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
i'm using PHP vers.4.3.ORC2; win2000serv.; IIS;
MySQL 3.23.47 when i wrote the following code: <?php $filehandler=fopen("myfile.txt","r"); $data=fread($filehandler,filesize($filehandler)); echo $data; ?> the following parsing error was generated: Warning: filesize() [function.filesize]: Stat failed for Resource id #1 (errno=2 - No such file or directory) in f:\inetpub\wwwroot\test.php on line 3 i found the solution 4 hours later was: $data=fread($filehandler,filesize("myfile.txt")); So the filename instead the filedescriptor was supposed. also: function_exists("isset")?1:0 returns 0!!!! at a time i find the isset function everywhere in the tutorials. will i be facing things like that? i'm a new comer to PHP/MySQL. It's been 2 weeks and i'm progressing with the speed of light cause i have a backgroung with various programming language. but i'm facing a lot of problems with the tutorials herein. It's seems that there's a lot of incompatibility n configuration issues. And a lot of time consumed on problem solving.i'm thinking of building my own homepage n don't know what standard i can rely on. Any suggestions???!!! thanks a lot and excuse for this lot of talking. |
|
#2
|
|||
|
|||
|
hmm why not use apache instead of IIS.
__________________
Apache Expert |
|
#3
|
|||
|
|||
|
what's the advantage of Apache on IIS?
I have the IIS installed n configured to use PHP after a two days struggle. In addition i'm accustomed to use IIS, ASP... Any Idea about the "isset " problem. thanks asp_man. u r so rapid. |
|
#4
|
|||
|
|||
|
Quote:
isset() is in the standard library so should be there, not sure why it would be returning false. Use the script I attached to this post. This script will give you a complete listing of your installed libraries with each function available to the library....
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
|
#5
|
|||
|
|||
|
It's because because isset() is a language construct and not a function
__________________
Best Regards, Håvard Lindset |
|
#6
|
|||
|
|||
|
Quote:
i've tried to use the soft. "phpenv.zip" . I changed the "u_name" and the "u_pass". It was not possible to login from the "index.php" page. I see the isset function in every control structure for redirection in all the "phpenv.___.php" pages. Am i permitted to go around this problem by putting comments (/**/,//) on the login parts of the code. Also i've something to note about: I think that: if(($user==$_POST['u_name'])&&($password==$_POST ['u_pass'])) should better be: if(($_POST['user']==$u_name)&&($_POST['password']==$u_pass)) What do u say? I appreciate ur support. |
|
#7
|
|||
|
|||
|
Quote:
I've read somewhere that "print" can be used in expressions because it can return something that "echo" does not. Is this a construct and function issue? I've no clear view about this. thank you. |
|
#8
|
|||
|
|||
|
Ya - you can comment out that stuff to open up the pages. That app just gives you an inside look at your settings and what modules you have installed and what functions are available to each library with direct links to each function explanation on php.net.
Lol, your note is correct. You can switch those around. Oh, cokkies must be enabled so that could be your problem with the login issue.... |
|
#9
|
|||
|
|||
|
Quote:
Thanks again for the soft. It's very useful. Lately i've run SQLServer stored procedure from PHP. And was wondering about the other mssql______ series of functions. I found it all. In addition I've fond the binary collection functions i've read about. Really thanks. I've used 75% of the tutorials found here. But a real problem is faced with every application containing logins (header()cookies,sessions) and redirections. How can i know that COOKIES are enabled!? (Is it in IE, Tools,internet options,security.) thanks in advance. |
|
#10
|
|||
|
|||
|
I'd go for Apache. It's far more suited to PHP than IIS. I sincerely dislike IIS.
|
|
#11
|
|||
|
|||
|
Quote:
this is part of the index.php from: <?php ... 1 if(isset($_COOKIE['logstatus'])){ 2 //setcookie ("logstatus","ok",time()-3600 ); 3 header('location: phpenv.servervars.php'); 4 exit; 5 } 6 if(isset($_POST['submit'])){ 7 if(($_POST['user']==$u_name)&&($_POST['password']==$u_pass)){ 8 setcookie ("logstatus","ok",time()+3600 ); 9 header("location: phpenv.core.php"); 10 exit; 11 } ... <form name="form1" method="post" action="index.php"> ... ?> I'm never redirected at line 9 for the cookie is never set. For the cookie "logstatus" to be set i need to comment line 9. So every time i try to relogin i'm always redirected at line 3. I've tried to delete the cookie. So i added line 2 to the code. I'm always redirected at line 3. The cookie is not deleted unless i comment line 3. Again n again.... In brief, the sequence of instructions: setcookie(); header(); is not working one after another. I've been facing cases like this from the tutorials here that i can report about. But this is the latest n its straight to the point. I appreciate your help fellow OSS programmers. You'll know that later. By the way excuse me for my english. Really thanks. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > new comer questions. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|