我们用 PHP 编写的某些标签会影响实时服务器的性能吗?
我在 PHP 中编写了一些标签,
<a href="<?php bloginfo('url'); ?>/?cat=<?php $cate_id ?>"><?php echo $resid->post_content ?></a>
甚至是这个标签,
echo "<li><a href = '?cat=$cate_id'>".$resid->post_content."</a></li>";?>
这在任何情况下都会影响实时服务器的性能吗?上传后我没有让图像出现在实时服务器上,但在我的本地系统(在我这边)上,一切都很好。
I have written some tags in PHP as
<a href="<?php bloginfo('url'); ?>/?cat=<?php $cate_id ?>"><?php echo $resid->post_content ?></a>
or even this one
echo "<li><a href = '?cat=$cate_id'>".$resid->post_content."</a></li>";?>
Does this in any case affect the performance on the live server. I am no getting the image to appear on the live server after upload but on my local system(on my side) , things are fine..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
不,跳入和跳出 PHP 不会对服务器性能产生任何影响。请务必检查文件路径中是否存在未渲染的图像。可能是路径编码不正确,或者如果您将数据库从本地传输到实时,则可能存在本地路径设置不正确。
我建议在 Firefox 中打开页面并单击工具 ->查看页面信息 ->媒体和任何灰色/斜体的内容都将返回 404。
No, jumping in and out of PHP should not affect anything in terms of server performance. Be sure to check your file path for that image that isn't rendering. It could be that the path is coded incorrectly or if you transfered the DB from local to live there may be local path settings that are incorrect.
I'd suggest opening the page in Firefox and clicking Tools -> View Page Info -> Media and anything grayed/italicized will be returning a 404.
最可能的问题是图像的路径在服务器上不正确。要检查这一点,请查看页面的源代码并查看图像的 src 属性,然后通过输入地址栏来查看该路径是否存在于您的服务器上。
The most likely issue is that the path to the image isn't right on the server. To check this, view the source of the page and look at the src attribute of the image and see if that path exists on your server by putting in the address bar.
不会,标签永远不会影响服务器的性能。请确保当您使用某些框架时可能会影响代码执行时间。
No, tags never affect the server's performance. please make sure that when you use some framework may affect the code execution time.