开发者

PHP scripts are not executing on some of the pages

开发者 https://www.devze.com 2023-01-15 18:32 出处:网络
One of my php website is not working fully. Its showing me only home page and when i try to open up any present link it shows me the php code of the file that is called in for that link.

One of my php website is not working fully. Its showing me only home page and when i try to open up any present link it shows me the php code of the file that is called in for that link.

PHP is installed properly. Same server i开发者_如何学运维s hosting more than 10 other websites of PHP. No .htaccess parameters etc.. Same site is working on some other server with same settings and same code... I am unable to find the reason..


Make sure you are using

<?php .. ?> 

tags everywhere, you might know this, but I am pointing it out just in case.

In earlier versions, apache would pick up and compile anything with

<? ... ?> 

tags and it was a mistake since it was getting confused with the xml file versions.

so they changed it to complie only stuff in

<?php ... ?>

Also, again, you might know this, make sure you are hosting it on a php supported server.

There is also this "feature" that you can configure in your .htaccess to ignore certain files. make sure your .htaccess is not having exceptions for php compilation.

I cant think of anything else right now :)


Make sure everything of your PHP-Code is between the php tags like iamserious has written upstairs.

Make sure you're filename's extension is .php index.php for example. Make sure it's in the path to the file is ok! Make sure you're webserver is working perfectly with PHP!

0

精彩评论

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