destroy

swfupload destroy session? php

家住魔仙堡 提交于 2019-12-02 00:47:05
hy, i need a little help here: i use SWFupload to upload images! in the upload function i make a folder call $_SESSION['folder'] and all the files i upload are in 1 array call $_SESSION['files'] after uploads finish i print_r($_SESSION) but the array is empty? why that? this is my upload.php: if($_FILES['image']['name']) { list($name,$error) = upload('image','jpeg,jpg,png'); if($error) {$result = $error;} if($name) { // Upload Successful $result = watermark($name); print '<img src="uploads/'.$_SESSION['dir'].'/'.$result.'" />'; } else { // Upload failed for some reason. print 'noname'.$result;

Creating javascript function to destroy php session

◇◆丶佛笑我妖孽 提交于 2019-12-01 07:51:31
问题 I am having trouble figuring out how to create a javascript function that will destroy a php session. I have a clickable link that will call a function called destroyphpsess. I think this is all right so far. Now I need to define the javascript function. This is the code I have so far... if ($_SESSION['color'] == "") { $var = "<a href='JavaScript:newPopup(\"http://www.yourfantasyfootballreality.com/register.php\");' class='two'>Register</a> | <a href='JavaScript:newPopup(\"http://www

Rails session gets destroy whenever model destroy link is clicked

落花浮王杯 提交于 2019-12-01 04:31:38
If I click destroy on any record for my 3 models models, the user gets logged out. I'm using Devise and Ominauth. #This logs out a user def destroy @rating = Rating.find(params[:id]) @rating.destroy end Started POST "/ratings/29" for 192.168.1.103 at 2011-02-26 20:11:45 +0000 Processing by RatingsController#destroy as HTML Parameters: {"id"=>"29"} User Load (0.5ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1 Rating Load (0.3ms) SELECT `ratings`.* FROM `ratings` WHERE `ratings`.`id` = 29 LIMIT 1 SQL (0.0ms) BEGIN AREL (0.5ms) DELETE FROM `ratings` WHERE `ratings`.`id` = 29 SQL

Unbind/Destroy fancybox 2 events

 ̄綄美尐妖づ 提交于 2019-12-01 04:00:30
I am having a strange issue, I have code that pulls content via ajax and then binds Fancybox (2) to certain elements. The issue is that when I "refresh" this page I call the same function that pulls and binds Fancybox again. My normal approach that has been working up until I changed to Fancybox 2 is to unbind the elements and rebind them. This however does not seem to be working with FB2. I have tried the following: $('.tool_button').unbind('click.fb'); $('.tool_button').unbind('click'); $('.tool_button').unbind(); $('.tool_button').off('click.fb'); $('.tool_button').off('click'); $('.tool

Rails session gets destroy whenever model destroy link is clicked

心不动则不痛 提交于 2019-12-01 03:04:06
问题 If I click destroy on any record for my 3 models models, the user gets logged out. I'm using Devise and Ominauth. #This logs out a user def destroy @rating = Rating.find(params[:id]) @rating.destroy end Started POST "/ratings/29" for 192.168.1.103 at 2011-02-26 20:11:45 +0000 Processing by RatingsController#destroy as HTML Parameters: {"id"=>"29"} User Load (0.5ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 2 LIMIT 1 Rating Load (0.3ms) SELECT `ratings`.* FROM `ratings` WHERE `ratings

Unbind/Destroy fancybox 2 events

爷,独闯天下 提交于 2019-12-01 01:11:36
问题 I am having a strange issue, I have code that pulls content via ajax and then binds Fancybox (2) to certain elements. The issue is that when I "refresh" this page I call the same function that pulls and binds Fancybox again. My normal approach that has been working up until I changed to Fancybox 2 is to unbind the elements and rebind them. This however does not seem to be working with FB2. I have tried the following: $('.tool_button').unbind('click.fb'); $('.tool_button').unbind('click'); $('

How to free and garbage collect a WebGL context?

感情迁移 提交于 2019-12-01 00:06:33
问题 I'm developing a WebGL application for web and mobile. I often use hard-refreshs to test the results of my WebGL implementation. After a view tries, I get the error: Error: WebGL: Exceeded 16 live WebGL contexts for this principal, losing the least recently used one. This does not appear on a fresh started browser, but after refreshing the site multiple times. I guess the WebGL contexts are not finished, released, destroyed, cleaned up, freed correctly. How can I do this? Khronos Group

How to find out who ran the TFS Destroy Command?

半腔热情 提交于 2019-11-30 13:22:34
问题 I have reason to believe that the TFS Destroy command was run on my server. Does TFS provide a way to find out who and when it was done? 回答1: TFS logs all user-initiated commands in the database for 14 days. Try connect to your Tfs_Collection database and run the following query: SELECT * FROM tbl_Command WITH (NOLOCK) WHERE Command = 'Destroy' Additionally, any time a Destroy command is run, an event is logged to the Application Event Log on the Application Tier that processed the command.

Rails - AciveRecord use :dependent => :destroy on condition

我是研究僧i 提交于 2019-11-30 11:20:44
What will be the best/DRY way to destroy all the dependents of an object based on a condition. ? Ex: class Worker < ActiveRecord::Base has_many :jobs , :dependent => :destroy has_many :coworkers , :dependent => :destroy has_many :company_credit_cards, :dependent => :destroy end condition will be on Destroy: if self.is_fired? #Destroy dependants records else # Do not Destroy records end Is There a Way to use Proc in the :dependent condition. I have found the methods to destroy the dependents individually, but this is not DRY and flexible for further associations, Note: I have made up the

Calling servlet's destroy method

心已入冬 提交于 2019-11-30 11:14:36
As per the link http://www.xyzws.com/Servletfaq/when-is-destroy-of-servlets-called/20 , one of the reason of calling destroy method is when the servlet hasn't got a request in a long time . I was thinking there could be some pages that don't get called for a long time. So, does that mean destroy will be called and they will be no longer used? Actually, I was asked this question in interview and he told me that destroy method will only be called when server is shut down. Appreciate any help on this. Bhavesh Shah AFAIK, In java servlet, destroy() is not supposed to be called by the programmer.