忍者ブログ
ThIs SiTe Is A TyPo AnD A BuG.

[PR]

ソーシャルブックマークに追加:ブックマークに追加する
Category :
×

[PR]上記の広告は3ヶ月以上新規記事投稿のないブログに表示されています。新しい記事を書く事で広告が消えます。

[php]phpからdocument.writeでjavascript出したりするときに便利なやつ

ソーシャルブックマークに追加:ブックマークに追加する
Category :
参照元:http://feedtailor.jp/oishi/2007/05/javascriptdocumentwritephptext.html

ありがたく使わせて頂きます。
いつもdocument.writeでわざわざくくってましたが。

---------------------------------------------------------------------------------------------------------------------
 function js_write($a)
 {
  $lines = split("\n", $a);
 
  if(!empty($lines)){
   foreach($lines as $i => $line){
    $line = str_replace("'", "\'" , $line);
    $lines[$i] = preg_replace("|^(.*)$|", '\'$1\n\'+', $line);
   }
  }
  $a = join("\n", $lines);
  
   $a = substr($a, 0, strlen($a)-1);
  
  return 'document.write('.$str.');';
 }
-------------------------------------------------------------------------------------------------

とりあえず↓

 function jsAction(){
  echo $this->_js_document_write("<script type='text/javascript'>alert('aaaaa');</script>");
 }

な感じで、うまく動いた。




PR
この記事にコメントする
NAME:
TITLE:
MAIL:
URL:
COMMENT:
PASS: Vodafone絵文字 i-mode絵文字 Ezweb絵文字
hyxaqpej
ynvwxvqsmnixleggvjma, http://www.vhhzbpluxs.com mxjpapqfhr
ceoihmclyr URL 2011/07/31(Sun)23:32:35 EDIT | RES
dxwkuynugc
Hi there, what's up you guys???
dxwkuynugc URL 2011/08/02(Tue)00:15:15 EDIT | RES
xwnuovxkie
Hi there, what's up you guys???
xwnuovxkie URL 2011/08/02(Tue)05:38:47 EDIT | RES
Locksmiths San Francisco CA
Eternal nothingness is fine if you happen to be dressed for it.
Locksmith San Francisco CA URL 2011/08/02(Tue)14:35:37 EDIT | RES
hcg drops
We all agree that your theory is crazy, but is it crazy enough?
hcg drops URL 2011/08/02(Tue)16:23:24 EDIT | RES
hcg drops
We all agree that your theory is crazy, but is it crazy enough?
hcg drops URL 2011/08/02(Tue)17:18:09 EDIT | RES
Locksmith in Tampa FL
If you can read this you're not aiming in the right direction.
Locksmiths Tampa URL 2011/08/03(Wed)04:10:10 EDIT | RES
Voice recorders reviewed
Don't sweat the petty things, just pet the sweaty things.
Voice recorders reviewed URL 2011/08/03(Wed)06:07:31 EDIT | RES
Locksmith Virginia Beach
Patriotism means to stand by the country. It does not mean to stand by the president or any other public official...
Locksmith Virginia Beach URL 2011/08/03(Wed)06:23:59 EDIT | RES
Dr simeons hcg diet
My neighbour asked if he could use my lawnmower and I told him of course he could, so long as he didn't take it out of my garden.
HCG URL 2011/08/03(Wed)09:01:36 EDIT | RES
Locksmiths St Louis MO
It is better to be quotable than to be honest.
Locksmith St Louis URL 2011/08/03(Wed)09:18:55 EDIT | RES
Locksmiths Houston TX
I'm fed up to the ears with old men dreaming up wars for young men to die in.
Locksmiths Houston TX URL 2011/08/03(Wed)10:25:22 EDIT | RES
無題
Computer /nm./: a device designed to speed and automate errors.
NONAME 2011/08/03(Wed)11:46:32 EDIT | RES
Locksmith Tucson
If you're sick and tired of the politics of cynicism and polls and principles, come and join this campaign.
Locksmith Tucson URL 2011/08/03(Wed)13:34:14 EDIT | RES
incorporation
When his life was ruined, his family killed, his farm destroyed, Job knelt down on the ground and yelled up to the heavens, 'Why god? Why me?' and the thundering voice of God answered, 'There's just something about you that pisses me off.'
incorporate URL 2011/08/03(Wed)19:51:55 EDIT | RES
Locksmith Orlando FL
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25 !
Locksmiths Orlando FL URL 2011/08/03(Wed)23:51:21 EDIT | RES
Locksmiths Anaheim CA
Wit makes its own welcome and levels all distinctions.
Locksmith Anaheim URL 2011/08/04(Thu)01:13:46 EDIT | RES
Hcg diet phase 1
Multitasking /adj./ 3 PCs and a chair with wheels !
HCG URL 2011/08/04(Thu)02:40:23 EDIT | RES
Locksmith Hartford
The chain reaction of evil -- wars producing more wars -- must be broken, or we shall be plunged into the dark abyss of annihilation.
Locksmiths Hartford CT URL 2011/08/04(Thu)03:32:46 EDIT | RES
Locksmiths Richmond
Everything secret degenerates, even the administration of justice.
Locksmith Richmond URL 2011/08/04(Thu)07:10:44 EDIT | RES
aggressive dog training
A state of war only serves as an excuse for domestic tyranny.
dog training advice URL 2011/08/04(Thu)07:41:34 EDIT | RES
Locksmith Tampa FL
My opinions might have changed, but not the fact that I am right.
Locksmiths Tampa FL URL 2011/08/04(Thu)13:18:15 EDIT | RES
Locksmith Philadelphia PA
Ever notice when you blow in a dog's face he gets mad at you, but when you take him in a car he sticks his head out the window?
Locksmith Philadelphia PA URL 2011/08/04(Thu)16:04:26 EDIT | RES
Ativan
Democracy is where you can say what you think even if you don't think.
Ativan URL 2011/08/04(Thu)17:53:13 EDIT | RES
Wallpapers
Everything secret degenerates, even the administration of justice.
Wallpaper URL 2011/08/04(Thu)20:33:01 EDIT | RES
mp3 players
Never test for an error condition you don't know how to handle.
mp3 players URL 2011/08/04(Thu)23:02:33 EDIT | RES
Locksmiths Pittsburgh PA
Reality is that which, when you stop believing in it, doesn't go away.
Locksmith Pittsburgh URL 2011/08/04(Thu)23:33:13 EDIT | RES
Locksmith Indianapolis Indiana
I love Mickey Mouse more than any woman I have ever known.
Locksmith Indianapolis IN URL 2011/08/04(Thu)23:34:20 EDIT | RES
Locksmiths Tucson
The significant problems we face cannot be solved at the same level of thinking we were at when we created them.
Locksmith Tucson URL 2011/08/05(Fri)00:06:23 EDIT | RES
無題
A poem is never finished, only abandoned.
NONAME 2011/08/05(Fri)00:45:15 EDIT | RES
digicam reviews
If it wasn't for muscle spasms, I wouldn't get any exercise at all.
Steve's digicam reviews URL 2011/08/05(Fri)06:58:18 EDIT | RES
Locksmiths Oakland CA
The most important job is not to be Governor, or First Lady in my case.
Locksmith Oakland CA URL 2011/08/05(Fri)08:51:25 EDIT | RES
Locksmiths Oakland CA
A sense of humor is part of the art of leadership, of getting along with people, of getting things done.
Locksmith Oakland URL 2011/08/05(Fri)14:10:09 EDIT | RES
Locksmith Los Angeles
Ketchup left overnight on dinner plates has a longer half-life than radioactive waste.
Locksmith Los Angeles CA URL 2011/08/05(Fri)21:00:04 EDIT | RES
hcg
Silence is argument carried out by other means.
hcg diet URL 2011/08/06(Sat)07:05:22 EDIT | RES
Clomid
Minsky's Second Law: Don't just do something. Stand there.
Clomid steroid URL 2011/08/06(Sat)13:51:56 EDIT | RES
Propranolol
I begin by taking. I shall find scholars later to demonstrate my perfect right.
Propranolol for hemangiomas URL 2011/08/06(Sat)19:03:54 EDIT | RES
Combivir and sustiva
If you gaze long into an abyss, the abyss will gaze back into you.
Combivir URL 2011/08/07(Sun)02:36:14 EDIT | RES
Celexa
A pint of sweat, saves a gallon of blood.
Side effects celexa URL 2011/08/07(Sun)07:23:40 EDIT | RES
Clomid
Ever stop to think, and forget to start again?
Clomid menstrual cycle URL 2011/08/07(Sun)17:18:19 EDIT | RES
Cialis
Give me chastity and continence, but not yet.
Cialis URL 2011/08/07(Sun)18:22:48 EDIT | RES
What happens if i take clomid while pregnant
... one of the main causes of the fall of the Roman Empire was that, lacking zero, they had no way to indicate successful termination of their C programs.
Clomid URL 2011/08/07(Sun)19:58:18 EDIT | RES
Generic Propecia
The Stones, I love the Stones. I watch them whenever I can. Fred, Barney...
Generic Propecia URL 2011/08/07(Sun)21:47:41 EDIT | RES
Buy Zoloft
Military justice is to justice what military music is to music.
Buy Zoloft URL 2011/08/07(Sun)22:56:31 EDIT | RES
Ismo
If a man does his best, what else is there?
Ismo URL 2011/08/07(Sun)23:18:25 EDIT | RES
Sildenafil
Java, the best argument for Smalltalk since C++.
Sildenafil URL 2011/08/07(Sun)23:24:40 EDIT | RES
Ismo
Don't stay in bed, unless you can make money in bed.
Ismo 60 mg URL 2011/08/08(Mon)00:39:13 EDIT | RES
Mestinon
People demand freedom of speech to make up for the freedom of thought which they avoid.
Mestinon URL 2011/08/08(Mon)01:03:26 EDIT | RES
Celexa
Not only is there no God, but you try getting a plumber at weekends.
Celexa URL 2011/08/08(Mon)14:31:32 EDIT | RES
Info on propecia
I don't know why we are here, but I'm pretty sure that it is not in order to enjoy ourselves.
Propecia URL 2011/08/08(Mon)17:06:23 EDIT | RES
Effect of propecia
Of all the enemies to public liberty, war is perhaps the most to be dreaded because it comprises and develops the germ of every other.
Generic Propecia URL 2011/08/08(Mon)22:08:08 EDIT | RES
Lortab medication
A friendship founded on business is better than a business founded on friendship.
Propecia
The instinct of nearly all societies is to lock up anybody who is truly free. First, society begins by trying to beat you up. If this fails, they try to poison you. If this fails too, the finish by loading honors on your head.
Propecia URL 2011/08/09(Tue)06:58:22 EDIT | RES
Fioricet online pharmacy
Wit makes its own welcome and levels all distinctions.
Fioricet URL 2011/08/09(Tue)10:42:56 EDIT | RES
Fioricet picture
Before C++ we had to code all of our bugs by hand; now we inherit them.
Fioricet URL 2011/08/09(Tue)11:24:20 EDIT | RES
Created by awstats plugins online pharmacy tramadol
There's many a bestseller that could have been prevented by a good teacher.
Tramadol URL 2011/08/09(Tue)11:37:04 EDIT | RES
Wellbutrin sr side effects
A lie gets halfway around the world before the truth has a chance to get its pants on.
Buy wellbutrin online URL 2011/08/09(Tue)11:53:36 EDIT | RES
Lasix
If everything seems under control, you're just not going fast enough.
Lasix URL 2011/08/09(Tue)14:25:00 EDIT | RES
HCG Drops
Analyzing humor is like dissecting a frog. Few people are interested and the frog dies of it.
Homeopathic hcg drops URL 2011/08/09(Tue)16:55:17 EDIT | RES
Eszopiclone
Believe those who are seeking the truth. Doubt those who find it.
Eszopiclone URL 2011/08/09(Tue)20:03:50 EDIT | RES
Suhagra recall
If people can judge me on the company I keep, they would judge me with keeping really good company with Laura.
Suhagra delivered by fedex URL 2011/08/09(Tue)23:35:46 EDIT | RES
Interaction of azor and potassium znd lasix
You can only find truth with logic if you have already found truth without it.
Lasix URL 2011/08/10(Wed)00:30:38 EDIT | RES
Suhagra
Java, the best argument for Smalltalk since C++.
Suhagra URL 2011/08/10(Wed)07:14:32 EDIT | RES
Orlistat fat burner
UNIX is simple. It just takes a genius to understand its simplicity.
Dieting with orlistat URL 2011/08/10(Wed)07:26:03 EDIT | RES
Adipex
My advice to you is get married: if you find a good wife you'll be happy; if not, you'll become a philosopher.
Buy Adipex URL 2011/08/10(Wed)08:26:23 EDIT | RES
Ultram
Those are my principles. If you don't like them I have others.
Ultram URL 2011/08/10(Wed)09:48:00 EDIT | RES
Cialis dosage 20mg
Defining and analyzing humor is a pastime of humorless people.
Cialis 20mg URL 2011/08/10(Wed)16:00:55 EDIT | RES
Inderal
Conservatives are not necessarily stupid, but most stupid people are conservatives
Inderal pamelor parkinson's URL 2011/08/10(Wed)17:59:22 EDIT | RES
Tizanidine effect on renal function
Why was I with her? She reminds me of you. In fact, she reminds me more of you than you do!
Tizanidine URL 2011/08/11(Thu)00:24:37 EDIT | RES
Differin acne
I've never seen anyone change his mind because of the power of a superior argument or the acquisition of new facts. But I've seen plenty of people change behavior to avoid being mocked.
Differin URL 2011/08/11(Thu)02:18:54 EDIT | RES
Generic cialis soft
It is better to be quotable than to be honest.
Generic Cialis URL 2011/08/11(Thu)03:36:36 EDIT | RES
Buy Ambien
'Everything you say is boring and incomprehensible', she said, 'but that alone doesn't make it true.'
Buy Ambien URL 2011/08/11(Thu)05:22:03 EDIT | RES
Cialis professional fake
The man who goes alone can start today; but he who travels with another must wait till that other is ready.
Cialis professional indian URL 2011/08/11(Thu)10:05:37 EDIT | RES
Cialis Super Active
The purpose of computing is not numbers but insight.
Cialis Super Active URL 2011/08/11(Thu)12:32:32 EDIT | RES
Klonopin
Despite the high cost of living, it remains popular.
Klonopin identification URL 2011/08/11(Thu)14:05:45 EDIT | RES
Is oxycodone the same as oxycontin
The company doesn't tell me what to say, and I don't tell themwhere to stick it.
Oxycodone hcl URL 2011/08/11(Thu)16:35:23 EDIT | RES
Latisse
If you are going through hell, keep going.
Latisse URL 2011/08/11(Thu)19:01:46 EDIT | RES
無題
A picture is worth a thousand words (which is why it takes a thousand times longer to load...)
NONAME 2011/08/11(Thu)19:37:05 EDIT | RES
Priligy dapoxetine
If there is no Hell, a good many preachers are obtaining money under false pretences.
Priligy URL 2011/08/11(Thu)19:42:52 EDIT | RES
Buy Ambien
Maybe there is no actual place called hell. Maybe hell is just having to listen to our grandparents breathe through their noses when they're eating sandwiches.
Buy Ambien URL 2011/08/11(Thu)21:40:30 EDIT | RES
Buy Levitra
Politics is the art of looking for trouble, finding it everywhere, diagnosing it incorrectly, and applying the wrong remedies.
Buy Levitra URL 2011/08/12(Fri)01:09:48 EDIT | RES
Cheap Parliament Cigarettes
The significant problems we face cannot be solved at the same level of thinking we were at when we created them.
Ativan heart racing
Smoking is one of the leading causes of statistics.
Buy Ativan URL 2011/08/12(Fri)02:16:11 EDIT | RES
Nexium
I just bought a Mac to help me design the next Cray.
Nexium URL 2011/08/12(Fri)08:26:36 EDIT | RES
Percocet endocet
Deliver yesterday, code today, think tomorrow.
Percocet URL 2011/08/12(Fri)08:33:19 EDIT | RES
Differin
What a cruel thing is war: to separate and destroy families and friends, and mar the purest joys and happiness God has granted us in this world; to fill our hearts with hatred instead of love for our neighbors, and to devastate the fair face of this beautiful world.
Differin URL 2011/08/12(Fri)10:34:12 EDIT | RES
What to try after differin
Barabási's Law of Programming: Program development ends when the program does what you expect it to do — whether it is correct or not.
Differin URL 2011/08/12(Fri)10:34:20 EDIT | RES
Vigrx warning
Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
VigRX Plus URL 2011/08/12(Fri)10:35:01 EDIT | RES
hcg
Elegance is not a dispensable luxury but a factor that decides between success and failure.
hcg URL 2011/08/12(Fri)11:37:59 EDIT | RES
Generic ambien without a prescription
All rights left. All lefts reserved. All reserves removed. All removes right.
Eriacta
To love oneself is the beginning of a lifelong romance
Davidoff Cigarettes
When I die I'm going to leave my body to science fiction.
Davidoff Cigarettes URL 2011/08/12(Fri)12:31:59 EDIT | RES
Paroxetine
Real Programmers always confuse Christmas and Halloween because Oct31 == Dec25 !
Lunesta symptoms
So I rang up a local building firm, I said 'I want a skip outside my house.' He said 'I'm not stopping you.'
Lunesta boobs URL 2011/08/12(Fri)13:21:53 EDIT | RES
Gynexin nolvadex
In theory, there is no difference between theory and practice. But, in practice, there is.
Nolvadex product information URL 2011/08/12(Fri)13:23:20 EDIT | RES
Tizanidine dosage chickens poultry
Once you've written TBicycle, you never forget how.
Tizanidine URL 2011/08/12(Fri)14:42:29 EDIT | RES
Silagra blog
It is better to have a permanent income than to be fascinating.
Silagra fast shipping URL 2011/08/12(Fri)14:48:42 EDIT | RES
Cialis
Behind every great fortune there is a crime.
Cialis URL 2011/08/12(Fri)16:39:16 EDIT | RES
Norco
There is no reason anyone would want a computer in their home.
Norco URL 2011/08/12(Fri)17:19:20 EDIT | RES
Cheap Esse Cigarettes
Don't drive me crazy -- it's within walking distance.
Buy Esse Cigarettes URL 2011/08/12(Fri)17:29:45 EDIT | RES
この記事へのトラックバック
この記事にトラックバックする:
MA3楽天賞受賞
ありがとうございます。mash up award 3rdでカラフル.jpが楽天賞を頂きました。
PR
最新トラックバック
最新コメント
[12/12 poefoffirmvop]
[12/12 Beencerek]
[12/12 ecnaccounts]
[12/11 Kimineami]
[12/11 Kimineami]
カレンダー
03 2024/04 05
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
あわせて読みたい
あわせて読みたい
なかのひと
なかのひと
ブログ内検索
ログール
TrackWord
アクセス解析
このページのQRコード
Copyright © .☆★ ステレオタイプラボ ★☆. 。All Rights Reserved.
忍者ブログ[PR]