Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
为什么显示的时候会说Resource id #2?
Resource id #2
我所做的只是从.txt文件中获取一个简单的数字(0):
.txt
$num = fopen('qnum/qnum.txt', 'r'); echo $num;
您实际上并没有阅读该文件。您只是打开它并获取对该文件的引用。您必须添加更多代码(例如,与此问题的答案类似的内容)才能读取文件的内容。