<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ja">
		<id>https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Php%2Fzend_framework%2F%E3%83%A2%E3%83%90%E3%82%A4%E3%83%AB%E7%89%88%E4%BD%9C%E6%88%90</id>
		<title>Php/zend framework/モバイル版作成 - 変更履歴</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.nonip.net/index.php?action=history&amp;feed=atom&amp;title=Php%2Fzend_framework%2F%E3%83%A2%E3%83%90%E3%82%A4%E3%83%AB%E7%89%88%E4%BD%9C%E6%88%90"/>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Php/zend_framework/%E3%83%A2%E3%83%90%E3%82%A4%E3%83%AB%E7%89%88%E4%BD%9C%E6%88%90&amp;action=history"/>
		<updated>2026-04-24T22:54:21Z</updated>
		<subtitle>このウィキのこのページに関する変更履歴</subtitle>
		<generator>MediaWiki 1.24.2</generator>

	<entry>
		<id>https://wiki.nonip.net/index.php?title=Php/zend_framework/%E3%83%A2%E3%83%90%E3%82%A4%E3%83%AB%E7%89%88%E4%BD%9C%E6%88%90&amp;diff=12&amp;oldid=prev</id>
		<title>127.0.0.1: ページの作成:「==PCとMobileをModuleで切り分けて作成する方法==  index.php  &lt;?php  // Define path to application directory  defined('APPLICATION_PATH')      || define('APPLI...」</title>
		<link rel="alternate" type="text/html" href="https://wiki.nonip.net/index.php?title=Php/zend_framework/%E3%83%A2%E3%83%90%E3%82%A4%E3%83%AB%E7%89%88%E4%BD%9C%E6%88%90&amp;diff=12&amp;oldid=prev"/>
				<updated>2015-05-19T17:58:27Z</updated>
		
		<summary type="html">&lt;p&gt;ページの作成:「==PCとMobileをModuleで切り分けて作成する方法==  index.php  &amp;lt;?php  // Define path to application directory  defined(&amp;#039;APPLICATION_PATH&amp;#039;)      || define(&amp;#039;APPLI...」&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新規ページ&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==PCとMobileをModuleで切り分けて作成する方法==&lt;br /&gt;
&lt;br /&gt;
index.php&lt;br /&gt;
 &amp;lt;?php&lt;br /&gt;
 // Define path to application directory&lt;br /&gt;
 defined('APPLICATION_PATH')&lt;br /&gt;
     || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));&lt;br /&gt;
 // Define application environment&lt;br /&gt;
 defined('APPLICATION_ENV')&lt;br /&gt;
     || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));&lt;br /&gt;
 &lt;br /&gt;
 // Ensure library/ is on include_path&lt;br /&gt;
 set_include_path(implode(PATH_SEPARATOR, array(&lt;br /&gt;
     realpath(APPLICATION_PATH . '/../library'),&lt;br /&gt;
     realpath(APPLICATION_PATH . '/../modules/ZendFramework/library'),&lt;br /&gt;
     get_include_path(),&lt;br /&gt;
 )));&lt;br /&gt;
 /** Zend_Application */&lt;br /&gt;
 require_once 'Zend/Application.php';&lt;br /&gt;
 &lt;br /&gt;
 // Create application, bootstrap, and run&lt;br /&gt;
 $application = new Zend_Application(&lt;br /&gt;
     APPLICATION_ENV,&lt;br /&gt;
     APPLICATION_PATH . '/configs/application.ini'&lt;br /&gt;
 );&lt;br /&gt;
 &lt;br /&gt;
 require_once 'Net/UserAgent/Mobile.php';&lt;br /&gt;
 // モバイル判定&lt;br /&gt;
 $agent = Net_UserAgent_Mobile::singleton();&lt;br /&gt;
 if (!$agent-&amp;gt;isNonMobile()) {&lt;br /&gt;
     $terminal = 'mobile';&lt;br /&gt;
 } else {&lt;br /&gt;
     $terminal = 'default';&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 // router ini add&lt;br /&gt;
 $router = new Zend_Config_Ini(&lt;br /&gt;
     APPLICATION_PATH . '/configs/router.ini',&lt;br /&gt;
     $terminal&lt;br /&gt;
     );&lt;br /&gt;
 $router = $router-&amp;gt;toArray();&lt;br /&gt;
 $options = $application-&amp;gt;getOptions();&lt;br /&gt;
 $options['resources']['router']['routes'] = $router['routes'];&lt;br /&gt;
 $application-&amp;gt;setOptions($options);&lt;br /&gt;
 &lt;br /&gt;
 $application-&amp;gt;bootstrap()&lt;br /&gt;
             -&amp;gt;run();&lt;br /&gt;
&lt;br /&gt;
configs/router.ini&lt;br /&gt;
 [default]&lt;br /&gt;
 routes.api.route = &amp;quot;sample/:action&amp;quot;&lt;br /&gt;
 routes.api.defaults.module = &amp;quot;default&amp;quot;&lt;br /&gt;
 routes.api.defaults.controller = &amp;quot;sample&amp;quot;&lt;br /&gt;
 [mobile]&lt;br /&gt;
 routes.play.route = &amp;quot;sample/:action&amp;quot;&lt;br /&gt;
 routes.play.defaults.module = &amp;quot;mobile&amp;quot;&lt;br /&gt;
 routes.play.defaults.controller = &amp;quot;sample&amp;quot;&lt;/div&gt;</summary>
		<author><name>127.0.0.1</name></author>	</entry>

	</feed>