开发者

PHP code not executing, new to PHP

Last week I started playing around with LAMP Ubuntu and I didnt have any issues. Today some code wasn't working so I tried running this in index.php:

<?php phpinfo(); ?>

This does开发者_如何学JAVAn't work when I connect to localhost in my browser, but it works in testphp.php at localhost/testphp.php

Any suggestions?

Thanks


Try renaming the file to index.php


If you mean that code doesn't get executed when you access http://localhost/, then you should try to add
DirectoryIndex index.html index.php
to your apache's conf file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜