php in body -- missing something obvious -


My PHP is not PHPing, so tested simple ... something should be clear

  & lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php echo '& lt; Script language = \ "javascript \" & gt; Confirm ("are you seeing this?") & Lt; / Script & gt ;; '; ? & Gt; & Lt; / Body & gt; & Lt; / Html & gt;   

In the code body, I get: Confirm ("Are you seeing this?"); '; ? & Gt;


When I see "Source", I see:

& lt; Html & gt; & Lt; Top & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt ;? Php echo '& lt; Script language = \ "javascript \" & gt; Confirm ("are you seeing this?") & Lt; / Script & gt ;; '; ? & Gt; & Lt; / Body & gt; & Lt; / Html & gt;

What is the extension of your file? Running a webserver? How are you calling your php script?

Make sure there is a .php extension in it, the webserver is running, the file is under the Webroot directory and you can call it Http: // localhosti / path / To / file.php

Also make sure that you can not escape quotation marks when not necessary, echo & lt; Script type = "text / javascript" & gt; One ?? | & Lt; / Script & gt; '; should work

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -