config.php 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. <?php
  2. defined('BASEPATH') OR exit('No direct script access allowed');
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Base Site URL
  6. |--------------------------------------------------------------------------
  7. |
  8. | URL to your CodeIgniter root. Typically this will be your base URL,
  9. | WITH a trailing slash:
  10. |
  11. | http://example.com/
  12. |
  13. | WARNING: You MUST set this value!
  14. |
  15. | If it is not set, then CodeIgniter will try guess the protocol and path
  16. | your installation, but due to security concerns the hostname will be set
  17. | to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
  18. | The auto-detection mechanism exists only for convenience during
  19. | development and MUST NOT be used in production!
  20. |
  21. | If you need to allow multiple domains, remember that this file is still
  22. | a PHP script and you can easily do that on your own.
  23. |
  24. */
  25. $config['base_scheme'] = isset($_SERVER['REQUEST_SCHEME'])&&!empty($_SERVER['REQUEST_SCHEME']) ? $_SERVER['REQUEST_SCHEME'] : 'http';
  26. $config['base_url'] = $config['base_scheme'].'://'.$_SERVER['HTTP_HOST'];
  27. /*
  28. |--------------------------------------------------------------------------
  29. | Cmd Server
  30. |--------------------------------------------------------------------------
  31. |
  32. | The ip and port for your cmd server
  33. |
  34. */
  35. if (ENVIRONMENT === 'production') {
  36. $config['cmd_server']['ip'] = 'streetserver.weclouds.xyz';//'47.106.102.252';
  37. $config['cmd_server']['port'] = '6800';
  38. } else {
  39. $config['cmd_server']['ip'] = 'streetserver.weclouds.xyz';//'47.106.102.252';
  40. $config['cmd_server']['port'] = '6800';
  41. }
  42. /*
  43. |--------------------------------------------------------------------------
  44. | Index File
  45. |--------------------------------------------------------------------------
  46. |
  47. | Typically this will be your index.php file, unless you've renamed it to
  48. | something else. If you are using mod_rewrite to remove the page set this
  49. | variable so that it is blank.
  50. |
  51. */
  52. $config['index_page'] = 'index.php';
  53. /*
  54. |--------------------------------------------------------------------------
  55. | URI PROTOCOL
  56. |--------------------------------------------------------------------------
  57. |
  58. | This item determines which server global should be used to retrieve the
  59. | URI string. The default setting of 'REQUEST_URI' works for most servers.
  60. | If your links do not seem to work, try one of the other delicious flavors:
  61. |
  62. | 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
  63. | 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
  64. | 'PATH_INFO' Uses $_SERVER['PATH_INFO']
  65. |
  66. | WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
  67. */
  68. $config['uri_protocol'] = 'REQUEST_URI';
  69. /*
  70. |--------------------------------------------------------------------------
  71. | URL suffix
  72. |--------------------------------------------------------------------------
  73. |
  74. | This option allows you to add a suffix to all URLs generated by CodeIgniter.
  75. | For more information please see the user guide:
  76. |
  77. | https://codeigniter.com/user_guide/general/urls.html
  78. */
  79. $config['url_suffix'] = '';
  80. /*
  81. |--------------------------------------------------------------------------
  82. | Default Language
  83. |--------------------------------------------------------------------------
  84. |
  85. | This determines which set of language files should be used. Make sure
  86. | there is an available translation if you intend to use something other
  87. | than english.
  88. |
  89. */
  90. $config['language'] = 'english';
  91. /*
  92. |--------------------------------------------------------------------------
  93. | Default Character Set
  94. |--------------------------------------------------------------------------
  95. |
  96. | This determines which character set is used by default in various methods
  97. | that require a character set to be provided.
  98. |
  99. | See http://php.net/htmlspecialchars for a list of supported charsets.
  100. |
  101. */
  102. $config['charset'] = 'UTF-8';
  103. /*
  104. |--------------------------------------------------------------------------
  105. | Enable/Disable System Hooks
  106. |--------------------------------------------------------------------------
  107. |
  108. | If you would like to use the 'hooks' feature you must enable it by
  109. | setting this variable to TRUE (boolean). See the user guide for details.
  110. |
  111. */
  112. $config['enable_hooks'] = FALSE;
  113. /*
  114. |--------------------------------------------------------------------------
  115. | Class Extension Prefix
  116. |--------------------------------------------------------------------------
  117. |
  118. | This item allows you to set the filename/classname prefix when extending
  119. | native libraries. For more information please see the user guide:
  120. |
  121. | https://codeigniter.com/user_guide/general/core_classes.html
  122. | https://codeigniter.com/user_guide/general/creating_libraries.html
  123. |
  124. */
  125. $config['subclass_prefix'] = 'MY_';
  126. /*
  127. |--------------------------------------------------------------------------
  128. | Composer auto-loading
  129. |--------------------------------------------------------------------------
  130. |
  131. | Enabling this setting will tell CodeIgniter to look for a Composer
  132. | package auto-loader script in application/vendor/autoload.php.
  133. |
  134. | $config['composer_autoload'] = TRUE;
  135. |
  136. | Or if you have your vendor/ directory located somewhere else, you
  137. | can opt to set a specific path as well:
  138. |
  139. | $config['composer_autoload'] = '/path/to/vendor/autoload.php';
  140. |
  141. | For more information about Composer, please visit http://getcomposer.org/
  142. |
  143. | Note: This will NOT disable or override the CodeIgniter-specific
  144. | autoloading (application/config/autoload.php)
  145. */
  146. $config['composer_autoload'] = FALSE;
  147. /*
  148. |--------------------------------------------------------------------------
  149. | Allowed URL Characters
  150. |--------------------------------------------------------------------------
  151. |
  152. | This lets you specify which characters are permitted within your URLs.
  153. | When someone tries to submit a URL with disallowed characters they will
  154. | get a warning message.
  155. |
  156. | As a security measure you are STRONGLY encouraged to restrict URLs to
  157. | as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
  158. |
  159. | Leave blank to allow all characters -- but only if you are insane.
  160. |
  161. | The configured value is actually a regular expression character group
  162. | and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
  163. |
  164. | DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
  165. |
  166. */
  167. $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
  168. /*
  169. |--------------------------------------------------------------------------
  170. | Enable Query Strings
  171. |--------------------------------------------------------------------------
  172. |
  173. | By default CodeIgniter uses search-engine friendly segment based URLs:
  174. | example.com/who/what/where/
  175. |
  176. | You can optionally enable standard query string based URLs:
  177. | example.com?who=me&what=something&where=here
  178. |
  179. | Options are: TRUE or FALSE (boolean)
  180. |
  181. | The other items let you set the query string 'words' that will
  182. | invoke your controllers and its functions:
  183. | example.com/index.php?c=controller&m=function
  184. |
  185. | Please note that some of the helpers won't work as expected when
  186. | this feature is enabled, since CodeIgniter is designed primarily to
  187. | use segment based URLs.
  188. |
  189. */
  190. $config['enable_query_strings'] = FALSE;
  191. $config['controller_trigger'] = 'c';
  192. $config['function_trigger'] = 'm';
  193. $config['directory_trigger'] = 'd';
  194. /*
  195. |--------------------------------------------------------------------------
  196. | Allow $_GET array
  197. |--------------------------------------------------------------------------
  198. |
  199. | By default CodeIgniter enables access to the $_GET array. If for some
  200. | reason you would like to disable it, set 'allow_get_array' to FALSE.
  201. |
  202. | WARNING: This feature is DEPRECATED and currently available only
  203. | for backwards compatibility purposes!
  204. |
  205. */
  206. $config['allow_get_array'] = TRUE;
  207. /*
  208. |--------------------------------------------------------------------------
  209. | Error Logging Threshold
  210. |--------------------------------------------------------------------------
  211. |
  212. | You can enable error logging by setting a threshold over zero. The
  213. | threshold determines what gets logged. Threshold options are:
  214. |
  215. | 0 = Disables logging, Error logging TURNED OFF
  216. | 1 = Error Messages (including PHP errors)
  217. | 2 = Debug Messages
  218. | 3 = Informational Messages
  219. | 4 = All Messages
  220. |
  221. | You can also pass an array with threshold levels to show individual error types
  222. |
  223. | array(2) = Debug Messages, without Error Messages
  224. |
  225. | For a live site you'll usually only enable Errors (1) to be logged otherwise
  226. | your log files will fill up very fast.
  227. |
  228. */
  229. $config['log_threshold'] = 0;
  230. /*
  231. |--------------------------------------------------------------------------
  232. | Error Logging Directory Path
  233. |--------------------------------------------------------------------------
  234. |
  235. | Leave this BLANK unless you would like to set something other than the default
  236. | application/logs/ directory. Use a full server path with trailing slash.
  237. |
  238. */
  239. $config['log_path'] = '';
  240. /*
  241. |--------------------------------------------------------------------------
  242. | Log File Extension
  243. |--------------------------------------------------------------------------
  244. |
  245. | The default filename extension for log files. The default 'php' allows for
  246. | protecting the log files via basic scripting, when they are to be stored
  247. | under a publicly accessible directory.
  248. |
  249. | Note: Leaving it blank will default to 'php'.
  250. |
  251. */
  252. $config['log_file_extension'] = '';
  253. /*
  254. |--------------------------------------------------------------------------
  255. | Log File Permissions
  256. |--------------------------------------------------------------------------
  257. |
  258. | The file system permissions to be applied on newly created log files.
  259. |
  260. | IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
  261. | integer notation (i.e. 0700, 0644, etc.)
  262. */
  263. $config['log_file_permissions'] = 0644;
  264. /*
  265. |--------------------------------------------------------------------------
  266. | Date Format for Logs
  267. |--------------------------------------------------------------------------
  268. |
  269. | Each item that is logged has an associated date. You can use PHP date
  270. | codes to set your own date formatting
  271. |
  272. */
  273. $config['log_date_format'] = 'Y-m-d H:i:s';
  274. /*
  275. |--------------------------------------------------------------------------
  276. | Error Views Directory Path
  277. |--------------------------------------------------------------------------
  278. |
  279. | Leave this BLANK unless you would like to set something other than the default
  280. | application/views/errors/ directory. Use a full server path with trailing slash.
  281. |
  282. */
  283. $config['error_views_path'] = '';
  284. /*
  285. |--------------------------------------------------------------------------
  286. | Cache Directory Path
  287. |--------------------------------------------------------------------------
  288. |
  289. | Leave this BLANK unless you would like to set something other than the default
  290. | application/cache/ directory. Use a full server path with trailing slash.
  291. |
  292. */
  293. $config['cache_path'] = '';
  294. /*
  295. |--------------------------------------------------------------------------
  296. | Cache Include Query String
  297. |--------------------------------------------------------------------------
  298. |
  299. | Whether to take the URL query string into consideration when generating
  300. | output cache files. Valid options are:
  301. |
  302. | FALSE = Disabled
  303. | TRUE = Enabled, take all query parameters into account.
  304. | Please be aware that this may result in numerous cache
  305. | files generated for the same page over and over again.
  306. | array('q') = Enabled, but only take into account the specified list
  307. | of query parameters.
  308. |
  309. */
  310. $config['cache_query_string'] = FALSE;
  311. /*
  312. |--------------------------------------------------------------------------
  313. | Encryption Key
  314. |--------------------------------------------------------------------------
  315. |
  316. | If you use the Encryption class, you must set an encryption key.
  317. | See the user guide for more info.
  318. |
  319. | https://codeigniter.com/user_guide/libraries/encryption.html
  320. |
  321. */
  322. $config['encryption_key'] = 'BOJAM@3$5^7*9)alphaing';
  323. /*
  324. |--------------------------------------------------------------------------
  325. | Session Variables
  326. |--------------------------------------------------------------------------
  327. |
  328. | 'sess_driver'
  329. |
  330. | The storage driver to use: files, database, redis, memcached
  331. |
  332. | 'sess_cookie_name'
  333. |
  334. | The session cookie name, must contain only [0-9a-z_-] characters
  335. |
  336. | 'sess_expiration'
  337. |
  338. | The number of SECONDS you want the session to last.
  339. | Setting to 0 (zero) means expire when the browser is closed.
  340. |
  341. | 'sess_save_path'
  342. |
  343. | The location to save sessions to, driver dependent.
  344. |
  345. | For the 'files' driver, it's a path to a writable directory.
  346. | WARNING: Only absolute paths are supported!
  347. |
  348. | For the 'database' driver, it's a table name.
  349. | Please read up the manual for the format with other session drivers.
  350. |
  351. | IMPORTANT: You are REQUIRED to set a valid save path!
  352. |
  353. | 'sess_match_ip'
  354. |
  355. | Whether to match the user's IP address when reading the session data.
  356. |
  357. | WARNING: If you're using the database driver, don't forget to update
  358. | your session table's PRIMARY KEY when changing this setting.
  359. |
  360. | 'sess_time_to_update'
  361. |
  362. | How many seconds between CI regenerating the session ID.
  363. |
  364. | 'sess_regenerate_destroy'
  365. |
  366. | Whether to destroy session data associated with the old session ID
  367. | when auto-regenerating the session ID. When set to FALSE, the data
  368. | will be later deleted by the garbage collector.
  369. |
  370. | Other session cookie settings are shared with the rest of the application,
  371. | except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
  372. |
  373. */
  374. $config['sess_driver'] = 'files';
  375. $config['sess_cookie_name'] = 'ci_session';
  376. $config['sess_expiration'] = 300;
  377. $config['sess_save_path'] = NULL;
  378. $config['sess_match_ip'] = FALSE;
  379. $config['sess_time_to_update'] = 300;
  380. $config['sess_regenerate_destroy'] = FALSE;
  381. /*
  382. |--------------------------------------------------------------------------
  383. | Cookie Related Variables
  384. |--------------------------------------------------------------------------
  385. |
  386. | 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
  387. | 'cookie_domain' = Set to .your-domain.com for site-wide cookies
  388. | 'cookie_path' = Typically will be a forward slash
  389. | 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
  390. | 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
  391. |
  392. | Note: These settings (with the exception of 'cookie_prefix' and
  393. | 'cookie_httponly') will also affect sessions.
  394. |
  395. */
  396. $config['cookie_prefix'] = '';
  397. $config['cookie_domain'] = $_SERVER['HTTP_HOST'];
  398. $config['cookie_path'] = '/';
  399. $config['cookie_secure'] = FALSE;
  400. $config['cookie_httponly'] = FALSE;
  401. /*
  402. |--------------------------------------------------------------------------
  403. | Standardize newlines
  404. |--------------------------------------------------------------------------
  405. |
  406. | Determines whether to standardize newline characters in input data,
  407. | meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
  408. |
  409. | WARNING: This feature is DEPRECATED and currently available only
  410. | for backwards compatibility purposes!
  411. |
  412. */
  413. $config['standardize_newlines'] = FALSE;
  414. /*
  415. |--------------------------------------------------------------------------
  416. | Global XSS Filtering
  417. |--------------------------------------------------------------------------
  418. |
  419. | Determines whether the XSS filter is always active when GET, POST or
  420. | COOKIE data is encountered
  421. |
  422. | WARNING: This feature is DEPRECATED and currently available only
  423. | for backwards compatibility purposes!
  424. |
  425. */
  426. $config['global_xss_filtering'] = FALSE;
  427. /*
  428. |--------------------------------------------------------------------------
  429. | Cross Site Request Forgery
  430. |--------------------------------------------------------------------------
  431. | Enables a CSRF cookie token to be set. When set to TRUE, token will be
  432. | checked on a submitted form. If you are accepting user data, it is strongly
  433. | recommended CSRF protection be enabled.
  434. |
  435. | 'csrf_token_name' = The token name
  436. | 'csrf_cookie_name' = The cookie name
  437. | 'csrf_expire' = The number in seconds the token should expire.
  438. | 'csrf_regenerate' = Regenerate token on every submission
  439. | 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
  440. */
  441. $config['csrf_protection'] = FALSE;
  442. $config['csrf_token_name'] = 'csrf_test_name';
  443. $config['csrf_cookie_name'] = 'csrf_cookie_name';
  444. $config['csrf_expire'] = 7200;
  445. $config['csrf_regenerate'] = TRUE;
  446. $config['csrf_exclude_uris'] = array();
  447. /*
  448. |--------------------------------------------------------------------------
  449. | Output Compression
  450. |--------------------------------------------------------------------------
  451. |
  452. | Enables Gzip output compression for faster page loads. When enabled,
  453. | the output class will test whether your server supports Gzip.
  454. | Even if it does, however, not all browsers support compression
  455. | so enable only if you are reasonably sure your visitors can handle it.
  456. |
  457. | Only used if zlib.output_compression is turned off in your php.ini.
  458. | Please do not use it together with httpd-level output compression.
  459. |
  460. | VERY IMPORTANT: If you are getting a blank page when compression is enabled it
  461. | means you are prematurely outputting something to your browser. It could
  462. | even be a line of whitespace at the end of one of your scripts. For
  463. | compression to work, nothing can be sent before the output buffer is called
  464. | by the output class. Do not 'echo' any values with compression enabled.
  465. |
  466. */
  467. $config['compress_output'] = FALSE;
  468. /*
  469. |--------------------------------------------------------------------------
  470. | Master Time Reference
  471. |--------------------------------------------------------------------------
  472. |
  473. | Options are 'local' or any PHP supported timezone. This preference tells
  474. | the system whether to use your server's local time as the master 'now'
  475. | reference, or convert it to the configured one timezone. See the 'date
  476. | helper' page of the user guide for information regarding date handling.
  477. |
  478. */
  479. $config['time_reference'] = 'local';
  480. /*
  481. |--------------------------------------------------------------------------
  482. | Rewrite PHP Short Tags
  483. |--------------------------------------------------------------------------
  484. |
  485. | If your PHP installation does not have short tag support enabled CI
  486. | can rewrite the tags on-the-fly, enabling you to utilize that syntax
  487. | in your view files. Options are TRUE or FALSE (boolean)
  488. |
  489. | Note: You need to have eval() enabled for this to work.
  490. |
  491. */
  492. $config['rewrite_short_tags'] = FALSE;
  493. /*
  494. |--------------------------------------------------------------------------
  495. | Reverse Proxy IPs
  496. |--------------------------------------------------------------------------
  497. |
  498. | If your server is behind a reverse proxy, you must whitelist the proxy
  499. | IP addresses from which CodeIgniter should trust headers such as
  500. | HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
  501. | the visitor's IP address.
  502. |
  503. | You can use both an array or a comma-separated list of proxy addresses,
  504. | as well as specifying whole subnets. Here are a few examples:
  505. |
  506. | Comma-separated: '10.0.1.200,192.168.5.0/24'
  507. | Array: array('10.0.1.200', '192.168.5.0/24')
  508. */
  509. $config['proxy_ips'] = '';
  510. /*
  511. |--------------------------------------------------------------------------
  512. | Timezone
  513. |--------------------------------------------------------------------------
  514. |
  515. | Set default timezone for your project
  516. |
  517. */
  518. date_default_timezone_set('PRC');
  519. $config['time_zone'] = date_default_timezone_get();
  520. // 萤石云配置信息
  521. $config['YSYAppkey'] = '24859998beb548aaa9672347de20e575';
  522. $config['YXYSecret'] = '242a5811e1596538a33bfdb76cef1337';
  523. // 大华配置信息
  524. $config['DHAppkey'] = 'lcc1f1a217dae143e6';
  525. $config['DHSecret'] = 'c108ac3d4d394cc08766330ea31a01';
  526. // 测试用的AccessToken
  527. $config['AccessToken'] = 'at.7wg2h99s0jeszu7i832rq4842zjvkqgz-1vw482arqn-13dyed9-fup5fkvb8';
  528. /* End of file config.php */
  529. /* Location: ./application/config/config.php */
  530. // wifi设备的MQTT服务器信息
  531. $config['WIFIMqttServer'] = 'streetserver.weclouds.xyz'; // 服务代理地址(mqtt服务端地址)
  532. $config['WIFIMqttPort'] = 1883; // 通信端口
  533. $config['WIFIMqttUsername'] = "weclouds"; // 用户名
  534. $config['WIFIMqttPassword'] = "weclouds@1234"; // 密码
  535. // 报警广播数据
  536. $config['RedioHost'] = 'http://118.31.12.250';
  537. $config['RedioUsername'] = 'djx';
  538. $config['RedioPassword'] = 'djx123';
  539. // 故障信息
  540. $config['batstatus'] = array('1'=>'Overdischarge','2'=>'Over Charge','3'=>'High temperature','4'=>'Battery overtemperature');
  541. $config['panelstatus'] = array('1'=>'Less than the optiocally controlled voltage','2'=>'greate than the optiocally controlled voltage','3'=>'greater than the battery voltage');
  542. $config['lampstatus'] = array('1'=>'open circuit','2'=>'short circuit','3'=>'overload','4'=>'Lamp overtemperature');
  543. $config['tempstatus'] = array('1'=>'Charge high temperature','2'=>'Charge over temperature','3'=>'Discharge high temperature','4'=>'Discharge over temperature');
  544. $config['onlinestatus'] = array('1'=>'Offline failure');