Tears of technology left behind

Published on / Toss and turn / 2 comments

Some time ago, I picked up some addresses of 360 wallpapers from the code I found on the Internet and created a random wallpaper.
The following picture is a 360 random picture
 360 random animation wallpaper
Buttons that you want to add random wallpapers to the editor for convenience.
I have successfully added the button of the random picture of the girl picture before. I thought it should be simple to copy and paste, and then modify it.
It turned out to be a big problem. It is a big problem that has never occurred since the contact with WP.
A direct prompt indicates that a fatal error has occurred, which is different from the usual error reporting code that appears on the top of the page.
Open the blog and see a very simple page to remind you that a fatal error has occurred and cannot run.
Instant big head
The problem occurred after adding the custom button of the second editor.
The first custom code added is purplish

 function appthemes_add_quicktags() { ?>  <script type="text/javascript">  QTags. addButton ('rd_img ',' sister picture ','<img src="addresses/images?<? Php echo mt_rand (11000);?>" alt="random pictures"?>',' '); </script> <? php } add_action('admin_print_footer_scripts', 'appthemes_add_quicktags' );

There is no problem with successful operation.
In the second time, I copied the above code below without thinking, and modified the relevant parameters.
Then start to report errors, even if the code added later or the code added earlier is commented and deleted in the file.
But I can only use a big trick to delete the current theme and reinstall it.
After reinstalling the theme, there were no problems.
After that, I started to add custom code. When I added the second custom button, I didn't simply copy the existing code directly
It's changed to

 function appthemes_add_quicktags() { ?>  <script type="text/javascript">  QTags. addButton ('rd_img ',' sister picture ','<img src="addresses/images?<? Php echo mt_rand (11000);?>" alt="random pictures"?>',' '); </script> <script type="text/javascript">  QTags. addButton ('rd_img360 ',' 360 Animation ','<img src="Address/360?<? Php echo mt_rand (11000);?>" alt="360 Random Animation Wallpaper"?>',' '); </script> <? php } add_action('admin_print_footer_scripts', 'appthemes_add_quicktags' );

After finding the problem, delete the new theme just uploaded, restore the deleted theme from the trash, and start to modify the code.
However, even if the code in the topic is changed to the correct code, fatal errors will be prompted when running.
Even if these codes are deleted, a fatal error will still be prompted.
The theme will not function properly until it is reinstalled.
Ah... I don't understand why, but at least it works.
There are risks in tossing and tossing. Remember to back up the data before you toss, or you will have to do it again.

  1. When php is closed,?/> What is it? There is an extra division sign.

    1. @Roughly Thanks for reminding me. Has been deleted. When inserting code, it always causes some display problems./It may be caused by escaping.