PHP MVC url Not Found 404

时间:2016-09-27 09:22:41

标签: php zend-framework

我在MVC Php应用程序中收到 URL not found错误 .htacess 文件似乎很好,并且apache配置得很好,因为其他应用程序运行良好。我在亚马逊上托管我的mysql数据库。

这是我的代码段。

LoginForm.php       

/ **  *  * /

   Options -MultiViews
   RewriteEngine On
   Options -Indexes
   RewriteBase /MIS/ysw/

   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-l
   RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

}

>

.htacess

  error_reporting(E_ALL);
  ini_set("display_errors", 1);

  define('URL', 'http://42.11.223.45/MIS/ysw/');


  define('DB_TYPE', 'mysql');
  define('DB_HOST', 'XXX');
  define('DB_NAME', 'amazon');
  define('DB_USER', 'xxxx');
  define('DB_PASS', 'ddddd');

的config.php

( function ( $ ) {
	// Add click event handler to button
	$( '#load-file' ).click( function () {
		if ( ! window.FileReader ) {
			return alert( 'FileReader API is not supported by your browser.' );
		}
		var $i = $( '#file' ), // Put file input ID here
			input = $i[0]; // Getting the element from jQuery
		if ( input.files && input.files[0] ) {
			file = input.files[0]; // The file
			fr = new FileReader(); // FileReader instance
			fr.onload = function () {
				// Do stuff on onload, use fr.result for contents of file
				$( '#file-content' ).append( $( '<div/>' ).html( fr.result ) )
			};
			//fr.readAsText( file );
			fr.readAsDataURL( file );
		} else {
			// Handle errors here
			alert( "File not selected or browser incompatible." )
		}
	} );
} )( jQuery );

我花了近13个小时试图弄清楚我做得不对,但如果得到通知会很高兴

1 个答案:

答案 0 :(得分:0)

请检查mod_rewrite是否有效,您可以从这里获取帮助:https://docs.bolt.cm/3.0/howto/making-sure-htaccess-works