mahdi_20 Posted July 17, 2008 Share Posted July 17, 2008 hi, all i have a form in my php code, that i send this form fields to server with ajax. an i have server page(php) for get response text the server page include some php code that one of this code is : Require_once("class/customer"); this cause my http.status refer 500 when the line of code deleted, my http.status refer 400 and i have not any problem what is solve way? ??? thanX in advance. Link to comment https://forums.phpfreaks.com/topic/115173-ajax-php-require-problem/ Share on other sites More sharing options...
Sulman Posted July 17, 2008 Share Posted July 17, 2008 Have you missed the extension off the end? Require_once("class/customer.php"); Link to comment https://forums.phpfreaks.com/topic/115173-ajax-php-require-problem/#findComment-592227 Share on other sites More sharing options...
mahdi_20 Posted July 17, 2008 Author Share Posted July 17, 2008 oh, sorry this line is: Require_once("class/customer.php"); Link to comment https://forums.phpfreaks.com/topic/115173-ajax-php-require-problem/#findComment-592230 Share on other sites More sharing options...
mahdi_20 Posted July 17, 2008 Author Share Posted July 17, 2008 the server page include a class code: <? class customer{ ... } ?> Link to comment https://forums.phpfreaks.com/topic/115173-ajax-php-require-problem/#findComment-592235 Share on other sites More sharing options...
Sulman Posted July 17, 2008 Share Posted July 17, 2008 Try running then ajax server page through the browser (i.e. bypassing the ajax page). There may be errors in there that will not show up because it runs in the background. Link to comment https://forums.phpfreaks.com/topic/115173-ajax-php-require-problem/#findComment-592237 Share on other sites More sharing options...
toivo Posted July 22, 2008 Share Posted July 22, 2008 If you run PHP 5 and have not enabled short open tags, you need to use the normal open tag: <?php Link to comment https://forums.phpfreaks.com/topic/115173-ajax-php-require-problem/#findComment-596536 Share on other sites More sharing options...
LemonInflux Posted July 22, 2008 Share Posted July 22, 2008 Have you done anything with that class? If you don't initialize it or anything, it won't return anything because nothing happens. ---------------- Now playing: Get Cape. Wear Cape. Fly - Waiting For The Monster To Drown via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/115173-ajax-php-require-problem/#findComment-596558 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.