onUpdate
event occur?
Ajax.Request
to the PHP web service, the data doesn't arrive or get saved properly.
But I can see that it is sending the data in Firebug.
file_put_contents()
will create a file if it's not already there.
file_put_contents
, the permission is denied even though I have set the permission in the webster to be ok to write, so how could i get the permission to write in the file.
die
), or do I want to return the error code to my Ajax request and do something with it in an onSuccess method?
header
function to return an error code to the page. It should show up with a red error code in Firebug.
header
function must come before you produce any output from your file. If you output any HTML and then try to set a header, PHP will complain. So do any code/logic involving headers first. Keep in mind that even just having whitespace from being in non-HTML mode, or an HTML comment at the top of your file, or including a file full of HTML, will count as "output".
session_start
at the start of every page that uses sessions.
The session_start
function doesn't create a new empty session every time you call it.
It just initializes PHP's session management system and creates/fills in the $_SESSION
array for you.
session_start
to initialize PHP's session system before you can call session_destroy
.