10/10/2018, 09:24
[Q]Rắc rối với PHP Tutorial 1
Tôi gặp rắc rối khi bước đầu học PHP, đoạn code
<?
phpinfo();
?>
để hiển thị thông tin về máy chủ khi upload lên www.spacepots.com thì không chạy, theo hướng dẫn thì như vậy là host không hỗ trợ PHP nhưng www.spaceports.com được giới thiệu là hỗ trợ PHP cơ mà, có ai biết free host hỗ trợ PHP giúp tôi với??
<?
phpinfo();
?>
để hiển thị thông tin về máy chủ khi upload lên www.spacepots.com thì không chạy, theo hướng dẫn thì như vậy là host không hỗ trợ PHP nhưng www.spaceports.com được giới thiệu là hỗ trợ PHP cơ mà, có ai biết free host hỗ trợ PHP giúp tôi với??
Bài liên quan
phpinfo();
?> bạn thư câu này xem sao nhé . câu này khác của cậu ở chỗ dòng đầu tiên của cậu là <? còn của mình là <?php
Your First Script
The first PHP script you will be writing is very basic. All it will do is print out all the information about PHP on your server. Type the following code into your text editor:
<?
phpinfo();
?>
As you can see this actually just one line of code. It is a standard PHP function called phpinfo which will tell the server to print out a standard table of information giving you information on the setup of the server.
Now you have finished your script save it as phpinfo.php and upload it to your server in the normal way. Now, using your browser, go the the URL of the script. If it has worked (and if PHP is installed on your server) you should get a huge page full of the information about PHP on your server.
If your script doesn't work and a blank page displays, you have either mistyped your code or your server does not support this function (although I have not yet found a server that does not). If, instead of a page being displayed, you are prompted to download the file, PHP is not installed on your server and you should either serach for a new web host or ask your current host to install PHP.
Thế nên tôi đang định tìm 1 host khác. Thank Maxx nhưng tôi dùng máy ở trường nên khỏi lo vấn đề đó
Host của hắn support PHP đó chứ :P
Chỉ có điều là host ngắt mất hàm phpinfo() và mail()....Ai cũng có thể thử trên localhost (nghịch php.ini)
Free thì đăng ký thử ở port5.com xem sao.
Thân
Những bài cũ chỉ nên tham khảo, không nên trả lời vì với khoảng cách 6 năm của một chủ đề, có lẽ bạn đang tư vấn cho một người thầy nào đó của mình chăng .
Các bài quá cũ được vinh dự ngóc lên sẽ closed.