Jump to content

Configuration Problem


Recommended Posts

[php: 5.3.1]

Ok, an hour later I am so pissed I can't think straight enough to tell somebody the difference between = and ==. I just installed latest version of xampp. Trying to run a script through php.exe via command line and it only echoes my code back to me. I try to run it through browser and get this:

Successful write"; }else{ echo "
Failed to write"; } fclose($fp); ?>

Here is my code:
<?
$html_file = "test.html";
$fp = fopen($html_file, "w+");
    if(fwrite($fp, "TEST")){
        echo "<br />Successful write";
    }else{
        echo "<br />Failed to write";
    }
    fclose($fp);
?>

I am almost certain there is some sort of magic quotes setting or some crap in the php.ini file. Right now I have these set accordingly:

php.ini
magic_quotes_gpc = Off

; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
; http://php.net/magic-quotes-runtime
magic_quotes_runtime = Off

; Use Sybase-style magic quotes (escape ' with '' instead of \').
; http://php.net/magic-quotes-sybase
magic_quotes_sybase = Off

 

Any shoves in the right direction or something?

 

Link to comment
https://forums.phpfreaks.com/topic/198684-configuration-problem/
Share on other sites

Don't use short open tags in your code (ever.) Short open tags were a lazy-way short-cut that has ended up wasting several orders of magnitude more time then they ever saved in typing time. How much time have you spent on this problem so far?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.