| |

VerySource

 Forgot password?
 Register
Search
View: 1137|Reply: 3

preg_split(): Unknown modifier'J', what is the error?

[Copy link]

3

Threads

11

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2021-3-10 14:00:01
| Show all posts |Read mode
<?
$start="/<td height=\"1\" align=\"center\"><script language=\"JavaScript\" type=\"text/JavaScript\" src=\"/adad/ad10.js\"></ script></td>/";

$content="<table width=\"760\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
          <TBODY>
            <tr>
              <td width=\"186\" height=\"1\"></td>
            </tr>
            <tr>
              <td height=\"1\" align=\"center\"><script language=\"JavaScript\" type=\"text/JavaScript\" src=\"/adad/ad10.js\"></script></td >
            </tr>
          </TBODY>
      </TABLE>";

$info = preg_split($start,$content);
?>

After running, it prompts Warning: preg_split(): Unknown modifier'J' in...

what is the reason?
Reply

Use magic Report

3

Threads

11

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2021-3-10 14:15:01
| Show all posts
I know the reason, because there is a / in front of JavaScript.

So what function is used to turn/to\/?

I have used addslashes to process $start and $content.
Reply

Use magic Report

0

Threads

17

Posts

17.00

Credits

Newbie

Rank: 1

Credits
17.00

 China

Post time: 2021-3-10 15:30:02
| Show all posts
I feel that the error is not scanned, and I will check my own code again.

J This variable is not assigned a usable value...
Reply

Use magic Report

3

Threads

11

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2021-3-10 16:15:01
| Show all posts
That's what I said. The problem is solved
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list