GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   programers: question for ya (https://gfy.com/showthread.php?t=417004)

Zester 01-15-2005 06:47 AM

programers: question for ya
 
what is the PHP equivalent to $! in Perl if any?

Zester 01-15-2005 07:11 AM

bump----------

Zester 01-15-2005 07:30 AM

wwwwwwwell?

Calvinguy 01-15-2005 07:34 AM

No idea... what do you want to do?

Zester 01-15-2005 07:39 AM

Quote:

Originally Posted by Calvinguy
No idea... what do you want to do?

i'm trying to write to a file, it fails but i'm not getting an error message

Calvinguy 01-15-2005 07:47 AM

@ is a "shut up" sign.... if it's in front of php commands no error message will be shown

Zester 01-15-2005 07:54 AM

Quote:

Originally Posted by Calvinguy
@ is a "shut up" sign.... if it's in front of php commands no error message will be shown

nope , don't have that :(

broke 01-15-2005 07:59 AM

Post the code.

Zester 01-15-2005 08:11 AM

Quote:

Originally Posted by broke
Post the code.

PHP Code:


$handle 
fopen ($filename"w");
if(!
fwrite ($handle$content)){ echo "Data insert failed!"; die;}
fclose ($handle); 


Zester 01-15-2005 08:37 AM

any ideas ?

Nathan 01-15-2005 08:42 AM

If it does not work but no errors are displayed, check the php.ini if errors are turned off, if so check your apache error log, they might be there.

kowntafit 01-15-2005 08:48 AM

Code:

if (fwrite($handle, $somecontent) hahahaha= FALSE) {
    echo "Cannot write to file ($filename)";
}


broke 01-15-2005 08:54 AM

What happens if you run this code?

The hahahaha should be a double =

PHP Code:

if (!$handle fopen ($filename"w")) {
  if(
fwrite ($handle$contenthahahaha FALSE) { 
      echo 
"Data insert failed!"
    die;
  } 
  
  echo 
"Success, wrote ($content) to file ($filename)";
  
fclose ($handle); 

} else {
  echo 
"File open failed!";
  die;




All times are GMT -7. The time now is 08:44 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123