我在 php 包含文件中获得了图像。
<img class="imgmove" src='data:image/png;base64,<?php echo base64_encode(file_get_contents("images/form/firstname.png")); ?>'>
代码完美无瑕。我正在测试设计并将图像拖到输入栏中,它会吐出以下内容:
数据:图像/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEkAAAAaCAYAAAGMbkETAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77uUh6cmVTek5UY3prYzlkIj8+//z8DMYAJXYCRkRGGz4NonApBoKio6D8QfwCxi4uLwVay4LDJsa+v7wBQsQGIDRIACCBGYtzIguY2kA5GJCEQv5EBZBIyBlqzH+q+BpAbQWIY1oF8B5QUADJBWAEkBhBAGCYhY6h16CAA2TlQdQ0gmomA3w5gEduA5C9DKPsBUaEFiyyQf5GEG4FYH+bK3t5esCKAAGIkNnkQBPjCC8mS/0hhtx8tHIkKK3RQAE1FjGgRQLSL9kMxjB2A5KoEsDpCBiEHNIwNzRAGyA4hymtohiVAvXceb17FkcsYgQYogGho2rkAZYOyqAMIAwQQQa8RyAH/0WL0P1osw7AAVPw8klgDNrVEhTcBR8EiNAGLoxqg+D+S/F1Wn9VSYhdkYSa1TC5H4nX1SB5z9cMmep0xMtcpLoZLt4N4cbPWnkkI2nxTIY7dFjifgyPSqmUVan+IgMF/d9AmwL4dHJrGVb3gy5pS3KKHxkp+QLA3Fr2y8qJNz2p+JlsxgWQ6kaXnAULYRTabuDLGuBWqNocLfwIeaPHXpw7WoToTmdKTftK8/XAvqSXeNMkj5aVSUZpLHVjsljVt8ShBs9WCsQE0otD+yQCR7XW6ZPzQwo2aXfxykiO9nHXMUZVoqlSJSbEl4AqLSmWXNk+3KZM+LFEVSIQNVaYa0uc0TFv5Dy4WkeqRzRdOTLQjIBu7KMRH5A1gQsWa+2upwDVWIFtg0AMRFUHSDYgG8AEDRs0E5ANWiYITEA6QbIB2QA2yAhJN8gG1H7dV671fAsihFpCgfzreR/JMqxsUgqN+zBf7+H6n3vejImks2yBq1hCoC6RjgRRsAWQOYCoQeNbrwHl06TiAk0a1v/g/C5DQLKjxlWMpoiBPG/ovka0WFH6Gf2jsKMZyIdZWaq0LiN6sJ97rNNsBfp5Z+nC6XGjzGTmx97WHoI04tQ40v+lQpyVSMoCkDjvWKwiQ/J7qdkwr4HxFTqXkeOzoItdwdknjN0TDmX45am5iqpH26K01ACzr0Gg7Utg7LQ8IuGSOIHHJwMXWEo63CqASJM3ORvRswbAyIlalyRFik0G6cnRijX8dSRYojogVHHoHQFvc73Uq0tgG0ceAfKoa7RXAxp5XuiLJNMa4yp1dY3SO9gXCSHqDPCaZOAAAAABJRU5ErkJggg==
所有这些代码是什么?有人可以告诉我吗?谢谢 - 我应该保护我的 php 文件,使其不显示此代码吗?