Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Bazilisk Posted May 23, 2015 Posted May 23, 2015 require_once( "path_to_ipb" . 'init.php' ); $request = \IPS\Request::i()->var; print ($request); How to get POST variables? Can not find it in docs. This method don't work
Bazilisk Posted May 23, 2015 Author Posted May 23, 2015 header('Content-type: text/html; charset=UTF-8'); include(dirname($_SERVER['DOCUMENT_ROOT']) . DIRECTORY_SEPARATOR . 'configlin.php'); error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); include($path_www2 . 'forum/sphinxapi.php'); define( 'IPB_THIS_SCRIPT', 'public' ); define( 'IPS_ENFORCE_ACCESS', TRUE ); // Приложение работает при отключенном форуме require_once( $path_to_ipb . 'init.php' ); //require_once( IPS_ROOT_PATH . 'sources/base/ipsRegistry.php' ); //require_once( IPS_ROOT_PATH . 'sources/base/ipsController.php' ); //$ipbRegistry = ipsRegistry::instance(); //$ipbRegistry->init(); //$memberData = &$ipbRegistry->member()->fetchMemberData(); $search_term = ""; $page = 1; $text_out = ""; //$request =& $ipbRegistry->fetchRequest(); $request = \IPS\Request::i()->var; print "<pre>"; print_r ($request); ......Its changed code from 3.4 version, but don't work.
newbie LAC Posted May 24, 2015 Posted May 24, 2015 require_once( "path_to_ipb" . 'init.php' ); $request = \IPS\Request::i()->var; print ($request); How to get POST variables? Can not find it in docs. This method don't work Change \IPS\Request::i()->var to \IPS\Request::i()
Bazilisk Posted May 28, 2015 Author Posted May 28, 2015 Fatal error: Cannot use object of type IPS\\Request as array
Marcher Technologies Posted May 28, 2015 Posted May 28, 2015 require_once( "path_to_ipb" . 'init.php' ); $request = \IPS\Request::i()->var; print ($request); How to get POST variables? Can not find it in docs. This method don't work Can you describe what isn't working? POST is merged into the data that object works with after REQUEST, so if you have a POST id=2 and a REQUEST id=3(should never happen obviously, merely an example), \IPS\Request::i()->id would return 2.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.